code that searches for current date

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

tyring to get a code that searches column F for the very first
instance of the current date (i.e. 10/3) and stops on that cell
 
Range("F:F").Find(Format(Now(), Range("F2").NumberFormat), , xlValues).Select

This assumes that the formatting is consistent down column F, and F2 contains a date...

HTH,
Bernie
MS Excel MVP
 
Sub findit()
n = Cells(Rows.Count, 6).End(xlUp).Row
td = Date
For i = 1 To n
If Cells(i, 6).Value = td Then
Cells(i, 6).Select
Exit Sub
End If
Next
End Sub
 
On Error Resume Next
iRow = Application.Match(Date,Columns(6),0)
On Error Goto 0
If iRow > 0 Then
...

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top