folgender Code:
Private Sub Worksheet_Change(ByVal Target As range)
On Error GoTo ERREXIT
Application.EnableEvents = False
Select Case Target.Column
Case 11 'K
Select Case Target.Value
Case Is = "AU ganztägig", "AU untertägig", "Urlaub"
Cells(Target.Row, 4).Resize(, 3).ClearContents 'D:F löschen
End Select
Case 4 To 6 'D:F
Select Case Cells(Target.Row, 11)
Case Is = "AU ganztägig", "AU untertägig", "Urlaub"
Target.ClearContents
End Select
Case 4 To 6 'D:F
Select Case Cells(Target.Row, 11)
Case Is = "AU ganztägig", "AU untertägig", "Urlaub"
Target.FormatConditions(1).Interior
.Pattern = xlGray16
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -4.99893185216834E-02
End Select
End Select
ERREXIT:
Application.EnableEvents = True
End Sub
Was nicht passt, ist die Formatierung (es passiert nix). Was ich möchte: Steht einer der Cases "Urlaub" etc... z. B. in K5 drin, soll D5:F5 entsprechend formatiert werden! Was mache ich falsch?Danke. Georg