go to cell with date equaling TODAY()

G

Guest

Hello! I have a spreadsheet with January 01, 2006 thru December 31, 2006 in
ascending order in column A, each date in a different cell (A1, A2, A3,
etc.). I don't enter data into this sheet everyday..in fact, months could go
by before having to enter an occurance for say, March 31. Is there a way to
have excel, upon opening the spreadsheet, advance the cursor to the cell with
that day's date in it?
 
B

Bill Kuunders

Using function Date rather than Today()
Works for me.



Private Sub Workbook_Open()
Dim r As Long
Dim T As Long
T = Date
r = Application.Match(T, Columns(1), True)
Application.Goto Cells(r, 1)
End Sub

Put the code in "this workbook"
to get there right click onto the icon to the left of "File" in the menu
bar.

select view code and select "this workbook" select workbook in the dropdown
of the left pane.
insert the code without the top line and the "end sub" line as they are
already there.........
 

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

Top