ich hoffe ihr könnt mir helfen, ich möchte eine bedingte Formatierung machen und zwar soll sich die Farbe in Zelle P30 ändern wenn in den Zellen P11:P25 die Kombination von Hintergrundfarbe 2 und Eintrag TZ öfters als 1x vorkommt
Public Function ColorIndex(Optional ByVal Target As Range = Nothing)
Dim i
Dim Arr()
If Target Is Nothing Then Set Target = Application.ThisCell
ReDim Arr(1 To Target.Cells.Count)
For i = 1 To Target.Cells.Count
Arr(i) = Target.Cells(i).Interior.ColorIndex
Next
ColorIndex = Arr
End Function
Du kannst schon in der Tabelle testen: