Dates are very tricky in VBA and quite honestly it seems I have not mastered them as of yet, but here is what I have.
On the FSR_Metrics sheet in row 2 is where I am searching. You have to make sure the date is in the same format as Date in VBA returns.
Date returns 2/10/2011 so if you make the cell match it will run. Just change the format
If you can't get it to work I will upload the sample sheet.
Sub FindToday()
Dim Found As Range
Dim rngSrc As Worksheet
Dim rngDst As Worksheet
Set rngSrc = ActiveWorkbook.Sheets("Regression_Report")
Set rngDst = ActiveWorkbook.Sheets("FSR_Metrics")
Set Found = rngDst.Rows(2).Find(what:=Date, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then Exit Sub
rngSrc.Range("B2:B6").Copy
rngDst.Cells(Found.Row, Found.Column).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Set rngSrc = Nothing
Set rngDst = Nothing
Set Found = Nothing
End Sub
Edit: If you want to keep the same format you can update to
Set Found = rngDst.Rows(2).Find(what:=Format(Date, "dd-mmm"), LookIn:=xlValues, lookat:=xlWhole)
Bookmarks