trebor1956
Board Regular
- Joined
- Jul 2, 2015
- Messages
- 100
- Office Version
- 2013
- Platform
- Windows
I have a macro as follows:
Sub selecttoday2()
For Each cell In ActiveSheet.Range("A2:NT2")
If cell.Value = [Today()] Then
cell.Select
End If
Next
End Sub
It currently says "Date not found" if it can't find the date.
It works fine but I want it to say "Not current year" if todays date is not found please.
Many thanks,
Sub selecttoday2()
For Each cell In ActiveSheet.Range("A2:NT2")
If cell.Value = [Today()] Then
cell.Select
End If
Next
End Sub
It currently says "Date not found" if it can't find the date.
It works fine but I want it to say "Not current year" if todays date is not found please.
Many thanks,