Hinweis auf Dringlichkeit
27.02.2018 09:56:30
Alina
Neue Woche, neue Frage:
Ich habe eine Tabelle mit Soll und Ist Terminen, also wann sollen sie stattfinden, und wann finden sie tasächlich statt.
In einer zweiten Tabelle wird mir angezeigt, wie schlimm man in Verzug war per Farbe (elf Tage zu spät: rot; bis zehn tage 10; pünktlich oder früher: grün)
Nun sollen die entsprechenden Zellen in dieser zweiten Tabelle auch schon gelb und rot gefärbt werden, wenn noch gar kein Ist Termin stattgefunden hat, sodass man sieht, dass dieser dringend ansteht.
Auszug aus meinem Code:
If Not IsEmpty(ws1.Cells(j + 1, 16)) Then
If Not IsEmpty(ws1.Cells(j + 1, 17)) Then
If IsDate(ws1.Cells(j + 1, 17).Text) Then
ws3.Cells(j, i).FormulaR1C1 = "=-days('Rtx Befüllung'!R" & (j + 1) & "C16,'Rtx Befüllung'!R" & (j + 1) & "C17)"
Call TerminFar(ws3.Cells(j, i), ws3.Cells(j, i).Text)
Else
ws3.Cells(j, i).Value = ""
Range(Cells(j, i), Cells(j, i)).Interior.ColoorIndex = xlNone
End If
End If
End If
TerminFar ist die Funktion um die Zellen entsprecehnd zu färben
Mein Ansatz:
If Not IsEmpty(ws1.Cells(j + 1, 10)) Then
If Not IsEmpty(ws1.Cells(j + 1, 11)) Then
If IsDate(ws1.Cells(j + 1, 11).Text) Then
ws3.Cells(j, i).FormulaR1C1 = "=-days('Rtx Befüllung'!R" & (j + 1) & "C10,'Rtx Befüllung'!R" & (j + 1) & "C11)"
Call TerminFar(ws3.Cells(j, i), ws3.Cells(j, i).Text)
Else
ws3.Cells(j, i).Value = ""
End If
ElseIf IsEmpty(ws1.Cells(j + 1, 11)) Then
ws3.Range(Cells(j, i), Cells(j, i)).Interior.ColoorIndex = 7
End If
End If
Natürlich wäre hier jede Zelle pink, aber noch nicht mal das funktioniert.
Habt ihr Ideen?
Hier zur veranschaulichung (Zeilen und Spalten sind abgewandelt)
https://www.herber.de/bbs/user/120083.xlsx