was ich nicht hinrkiege:
Wenn Tabelle 1 Datum aus K7 in Tabelle 2 Spalte A vorhanden, dann Makro stoppen. Wenn nicht vorhanden Makro ausführen.
DANKE
Dim doIT As Boolean
On Error Resume Next
doIT = WorksheetFunction.Match(Worksheets(1).Cells(7, 11), Worksheets(2).Columns(1), 0) > 0
If Err.Number = 0 Then Exit Sub
On Error GoTo 0
MsgBox "do what you must do..."
Gruess HansueliPublic Sub aaa()
If WorksheetFunction.CountIf(Worksheets("Tabelle2").Columns(1), Worksheets("Tabelle1").Range(" _
K7")) > 0 Then
Call DeinMakro
Else
'nix machen
End If
End Sub
Gruß WernerPublic Sub aaa()
If WorksheetFunction.CountIf(Worksheets("Tabelle2").Columns(1), _
Worksheets("Tabelle1").Range("K7")) > 0 Then
Call DeinMakro
Else
'nix machen
End If
End Sub
Gruß WernerSub Pruefe_ein_Datum()
If IsError(Application.Match(CLng(Tabelle1. _
Cells(7, 11).Value), Tabelle2.Columns(1), 0)) Then Exit Sub
MsgBox "Do something!"
End Sub