ich benötige bitte eure Hilfe,
ich möchte per Autofilter datumswerte selektieren die ich über eine Referenzliste ansteuere, nur bekomme meine Ergebnisse nicht wo ist denn der Fehler.
Könnt Ihr mir behilflich sein
Viele Grüße,
Merlin
__
Sub Test()
Dim Austritt As Date
Dim Bereich As Variant
Dim r, i, y As Integer
Dim s, Anzahl As Integer
Dim rng As Range
Sheets("Basis").Select
'zählen
Cells(1, 1).Select
Cells(16384, ActiveCell.Column).End(xlUp).Select
Range(Cells(ActiveCell.Row, 1), Cells(1, 1)).Select
Anzahl = Selection.Count
Cells(Anzahl + 1, 1).Select
Columns("L:L").Select
Selection.Copy
Sheets("Tabelle2").Select
Cells(1, 1).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.NumberFormat = "dd.mm.yyyy"
Columns("A:C").EntireColumn.AutoFit
Cells(1, 1).Select
Sheets("Tabelle2").Name = "Referenz"
'Matrix einlesen
Bereich = Range(Cells(2, 1), Cells(Anzahl, 1))
'Blatt wechseln
Sheets("Basis").Select
Application.CutCopyMode = False
Cells(1, 1).Select
'Filter setzen
Selection.AutoFilter
' aussteuern
For i = 1 To Anzahl - 1
'filtern
Selection.AutoFilter Field:=12, Criteria1:=Austritt
Austritt = Bereich(i, 1)
Next i
End Sub