habe ein kleines Problem, wie kann ich das "
Private Sub Worksheet_Change(ByVal Target As Range)" öffters in einer Tabelle verwenden.
für eure hilfe wäre ich sehr dankbar.
gruß
erich
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
On Error GoTo ERRORHANDLER
With Worksheets("Zeitdaten")
Cells(Target.Row, 3).Value = WorksheetFunction.VLookup(Target.Value, .Columns("A:D"), 2, 0)
End With
ERRORHANDLER:
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 4 Then Exit Sub
On Error GoTo ERRORHANDLER
With Worksheets("Zeitdaten")
Cells(Target.Row, 5).Value = WorksheetFunction.VLookup(Target.Value, .Columns("A:D"), 4, 0)
End With
ERRORHANDLER:
Application.EnableEvents = True
End Sub