wenn ich mehr als drei Formatierungen haben möchte, wie realsiere ich das?
Danke!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim bereich As Range
Set bereich = Intersect(Target, Range("A1:G16"))
If Not bereich Is Nothing Then
With bereich.Interior
Select Case bereich(1).Value
Case Is = "T"
.ColorIndex = 6
Case Is = "KT"
.ColorIndex = 36
Case Is = "K"
.ColorIndex = 36
Case Is = "NT"
.ColorIndex = 6
Case Is = "NN"
.ColorIndex = 41
Case Is = "N"
.ColorIndex = 41
Case Is = "R"
.ColorIndex = 15
Case Is = "X"
.ColorIndex = xlColorIndexNone
Case Else
.ColorIndex = xlColorIndexNone
End Select
End With
End If
End Sub