HI,
I have columns labeled with various dates.
How can I have excel go to the column with todays date when the sheet is opened?
Thanks,
Bobby
HI,
I have columns labeled with various dates.
How can I have excel go to the column with todays date when the sheet is opened?
Thanks,
Bobby
Hi,
Enter this code in the sheet with the dates
Assumes Date in Column A![]()
Please Login or Register to view this content.
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks for the quick reply.
I'm really not very good at this VBA thing yet (very interested though).
O.K. so I put the code into the sheet, saved and re-opened. But I couln't get it to work.
My dates are at the top of the columns, not in rows. So I'm thinking the code as written may be for the dates being in rows?
Thanks
Hi,
Try the below. Right click the sheet tab with the dates then select View code
Paste the below into VB and close.
Select a different sheet. then reselect the sheet with the dates.
Assumes dates are in Row 1 this time
VBA Noob![]()
Please Login or Register to view this content.
Example attached
VBA Noob
Still no go.
Is this line O.K?
SearchOrder:=xlByRows
Did the example work
VBA Noob
Not yet,
I must be doing something wrong. How do I get it to select the column with today's date?
Argh,
I was selecting the cell and you want the column
Try
VBA Noob![]()
Please Login or Register to view this content.
Great,
It's working. Thanks so much for the help.
I'm leaving now but will play with it some more tomorrow.
Appreciate the help...this stuff is fun.
Bobby
No problem
Thanks for the feedback
VBA Noob
Apologies for the necro, but I'm trying to do the same thing - only my dates are in column B, and are not in any formula. I need to run this macro to find todays date whenever run (or clicked, if a button can be added somehow?)
I've tried:
...and looked at the example sheet, but when I go into Macro (Alt+F8) to run it, there is nothing there to run... This is the first time I've properly tried to use/make any macro, so I need baby-instructions please![]()
Please Login or Register to view this content.
![]()
Thanks
Last edited by dancing-shadow; 11-04-2011 at 03:48 PM.
:... so I need baby-instructions ...
#1. Please read forum rule #2
#2. Start your own thread
Ben Van Johnson
Apologies - used to another forum where they'd rather same questions go in the same thread, rather than having 200 seperate threads all asking the same things... Makes searching for answers easier if it's all in one thread, rather than having to trawl through loads... Different strokes for different folks...
New thread started.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks