Ich moechte (Datums)Eintraege in die Spalte J farblich gestalten:
1.) Ist das Tagesdatum 7 Tage von dem Eintrag in Spalte J soll die Zelle gelb gefaerbt werden
2.) Ist das Tagesdatum ueberschritten, soll der Eintrag in Spalte J rot gefaerbt werden.
Soweit sogut, es tut sich schon was :) Allerdings werden auch alle Felder die KEINEN Eintrag haben rot gefaerbt, weis jemand schnelle abhilfe?
Danke
Anderl
Sub Macro()
Range("J10").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(INT(J10)<= TODAY())"
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(INT(J10)>TODAY(),(INT(J10)-TODAY())< 7)"
Selection.FormatConditions(2).Interior.ColorIndex = 6
Selection.Copy
FinalRow = Range("J15000").End(xlUp).Row
Range("J10:J" & FinalRow).Select
Selection.PasteSpecial Paste:=xlPasteFormats
End Sub