OK, now I'm asking:
I want to find a date in a range. Using this code from Ron de Bruin's site works just fine.
If you have date's in column A then this example will select the cell with today's date.
source: http://www.rondebruin.nl/find.htm#select
Sub Find_Todays_Date()
Dim FindString As Date
Dim Rng As Range
FindString = CLng(Date)
With Sheets("Sheet1").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End With
End Sub
But only if the dates have been manually entered. If I have a list of dates with a manually entered date in A1 and then =A1+1 in A2, copied down, the code tells me "Nothing found".
I've tried changing the LookIn: to xlValues, but that did not help.
What am I not getting? Is the date format important?
holding my breath...
Bookmarks