Macro to take user to a specific date

  • Thread starter Thread starter Raggy
  • Start date Start date
R

Raggy

I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?
 
MsgBox Rows(1).Find(What:=Date).Address
OR
MsgBox Rows(1).Find(What:=Date).Column


If this post helps click Yes
 
'To select or activate..
Activesheet.Rows(1).Find(Date, LookIn:=xlValues).Select

If this post helps click Yes
 
How do I put this into my spreadsheet macro. I'm no expert, any further
advice very much appreciated
 
You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()>

Sub Macro()
Activesheet.Rows(1).Find(Date, LookIn:=xlValues).Select
End Sub


If this post helps click Yes
 
Back
Top