Dec 22 2022 09:58 AM - edited Dec 22 2022 11:21 AM
Edit: Thank you, Quadruple_Pawn, for the help.
I am trying to make a macro button to set a cell to the Monday of the week I am on. Currently the output is getting the start of the week of Jan,1900 only instead of current date. Setting the value to = Weekday(date, 2) just makes it 4th of Jan,1900 instead.
Send help. T_T
Current Macro:
Sub StartWeek()
Range("C4").Value = Weekday(2)
End Sub
Current Output:
2-Jan-1900 |
Dec 22 2022 11:11 AM
SolutionSub StartWeek()
Range("C4").Value = Date - Weekday(Date) + 2
End Sub
You can try this code.