Forum Discussion

Andrew_Hinson's avatar
Andrew_Hinson
Brass Contributor
Jan 06, 2022
Solved

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...
  • HansVogelaar's avatar
    Jan 06, 2022

    Andrew_Hinson 

    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

Resources