Forum Discussion
Andrew_Hinson
Jan 06, 2022Brass Contributor
Macro for Todays date
Hi everyone! I am very very new to Macros and am trying to do the following: Add a macro (that I can then add to a button) that when I click it, it automatically finds todays date in column A, a...
- Jan 06, 2022
Try this macro:
Sub GoToToday() Dim rng As Range Set rng = Range("A:A").Find(What:=Date, LookIn:=xlFormulas) If rng Is Nothing Then Beep Else Application.Goto rng, True End If End Sub
HansVogelaar
Jan 06, 2022MVP
Try this macro:
Sub GoToToday()
Dim rng As Range
Set rng = Range("A:A").Find(What:=Date, LookIn:=xlFormulas)
If rng Is Nothing Then
Beep
Else
Application.Goto rng, True
End If
End Sub
Andrew_Hinson
Jan 07, 2022Brass Contributor
HansVogelaar absolutely amazing, works perfectly! Thank you so much :). Any recommendations on where I can start for learning Macros?
- HansVogelaarJan 07, 2022MVP
- Andrew_HinsonJan 11, 2022Brass ContributorThat's great, thank you very much.