habe für die bedingte Formatierung mit mehr als drei Möglichkeiten folgendes VBA im Einsatz:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C28:DP43")) Is Nothing Then Exit Sub
If Target.Value = "T" Then
Target.Interior.ColorIndex = 4
Target.Font.ColorIndex = 1
End If
If Target.Value = "KT" Then
Target.Interior.ColorIndex = 4
Target.Font.ColorIndex = 1
End If
If Target.Value = "K" Then
Target.Interior.ColorIndex = 4
Target.Font.ColorIndex = 1
End If
If Target.Value = "NT" Then
Target.Interior.ColorIndex = 4
Target.Font.ColorIndex = 1
End If
If Target.Value = "N" Then
Target.Interior.ColorIndex = 5
Target.Font.ColorIndex = 2
End If
If Target.Value = "NN" Then
Target.Interior.ColorIndex = 5
Target.Font.ColorIndex = 2
End If
If Target.Value = "NB" Then
Target.Interior.ColorIndex = 5
Target.Font.ColorIndex = 2
End If
If Target.Value = "R" Then
Target.Interior.ColorIndex = 3
Target.Font.ColorIndex = 2
End If
End Sub
Leider funktioniert es nur wenn ich direkt z.B. NB oder R in das Feld eingebe. Wie schaffe ich es das die Felder eingefärbt werden wenn das Ergebnis einer Formel NB oder R ist?
Danke,
Jan