Hi all!
I have the code below that calls a macro on the 20th of every month but only once by adding and clearing date on cell C3 based on IF's
Is there a way I can modify it so that it can do that also on the 21st of the month but again only if on the 20th that macro hadn't been called?
The reason I would like that is because sometimes the spreadsheet doesn't get opened on the 20th so I would still like the macro to be called the next day.
Thanks in advance!
I have the code below that calls a macro on the 20th of every month but only once by adding and clearing date on cell C3 based on IF's
Is there a way I can modify it so that it can do that also on the 21st of the month but again only if on the 20th that macro hadn't been called?
The reason I would like that is because sometimes the spreadsheet doesn't get opened on the 20th so I would still like the macro to be called the next day.
Thanks in advance!
VBA Code:
If Day(Date) <> 20 Then
Cells(1, 3).ClearContents
GoTo Fine
End If
If Day(Date) = 20 And Cells(1, 3).Value <> "" Then GoTo Fine
If Day(Date) = 20 And Cells(1, 3).Value = "" Then
Cells(1, 3).Value = Date + Time
Call Macro