Hi,
I have this code that finds todays date but I was wondering if it could be altered to search and select the current month and year instead?
In my range I have the following and they are formatted this way as well:
Jan-21
Feb-21
Mar-21 and so on for the year.
Any help would be appreciated.
Thanks
Dan
I have this code that finds todays date but I was wondering if it could be altered to search and select the current month and year instead?
VBA Code:
Sub AAAAAA()
Dim C As Range
Dim Flag As Boolean
Dim D As Date
Flag = False
D = Date
For Each c In Range("AA2:AA13")
If C = D Then
Flag = True
c.Select
End If
Next c
If Flag = False Then
MsgBox "No Date Found"
Exit Sub
End If
End Sub
In my range I have the following and they are formatted this way as well:
Jan-21
Feb-21
Mar-21 and so on for the year.
Any help would be appreciated.
Thanks
Dan