Suchmakro
20.06.2009 21:00:09
Karsten
Sepp hat mir behilflicherweise diesen Befehl geschrieben. Allerdings brauche ich ihn auch noch so, dass die Suche von B2 bis zum heutigen Datum läuft, nicht wie hier ab dem heutigen Datum.
Besten Dank für eure Hilfe.
Gruß
Karsten
Option Explicit
Public rng As Range
Public rngBereich As Range
Sub finde_Inhalt_in_B()
Dim varRes
With ActiveSheet
If rng Is Nothing Then
varRes = Application.Match(CLng(Date), .Range("A:A"), 0)
If IsNumeric(varRes) Then
Set rngBereich = .Range(Cells(varRes, 2), .Cells(Rows.Count, 2))
Set rng = rngBereich.find(What:=.Cells(1, 2), LookIn:=xlValues, LookAt:=xlPart, After:= _
rngBereich.Cells(rngBereich.Rows.Count, 1))
If Not rng Is Nothing Then Application.Goto rng
End If
Else
Set rng = rngBereich.FindNext(rng)
If Not rng Is Nothing Then Application.Goto rng
End If
End With
End Sub