Gruppe
Ereignis
Problem
Werden in Zeile 1 ein F und in Zeile 2 ein Ur eingesetzt, soll das F in Klammern gesetzt werden.
ClassModule: Tabelle1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row > 2 Then Exit Sub
Application.EnableEvents = False
On Error GoTo ERRORHANDLER
If Cells(1, Target.Column) = "F" And Cells(2, Target.Column) = "Ur" Then
Cells(1, Target.Column) = "(F)"
End If
If Cells(1, Target.Column) = "(F)" And Cells(2, Target.Column) <> "Ur" Then
Cells(1, Target.Column) = "F"
End If
ERRORHANDLER:
Application.EnableEvents = True
End Sub