nach langem Suchen hab ich noch nicht das passende gefunden.
Pseudocode
Sub Bedingte_Formatierung()
' Bedingte_Formatierung Makro
For i = Cells(Rows.Count, 1).End(xlUp).Row To 20 Step -1
If Cells(i, 11).Interior.ColorIndex xlNone And Cells(i, 11).Interior.ColorIndex 34 And _
Cells(i, 11).Value "" Then
Cells(i, 11).Select
End If
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="="
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Next i
For i = Cells(Rows.Count, 1).End(xlUp).Row To 20 Step -1
If Cells(i, 11).Interior.ColorIndex xlNone And Cells(i, 11).Interior.ColorIndex 34 And _
Cells(i, 11).Value "" Then
Cells(i, 11).Select
End If
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=18"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Next i
End Sub
Mein Wunsch ist es anstelle von Formula1:="=20" oder weiter unten Formula1:="=18" einen Zellbezug auf ein anderes Blatt zu bekommen.Sagen wir mal Blatt: "Zellbezug" Zelle: B3
Mit Formula1:="='Zellbezug'!B3" geht es leider nicht..
Kann mir da jemand helfen?
Viele Grüße