Excel VBA Macro to Set a Cell to Monday of the Current Week
Question details
Calculate the Monday of the current week with a VBA macro and display it in cell C4.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants a macro to put the current week's Monday date in a worksheet cell.
- Observed behavior
- The macro writes a weekday number directly to the cell, which displays as a date in January 1900.
Open the workbook in a desktop version of Excel that supports VBA and identify the worksheet where cell C4 should be updated. Enable macros only if you trust the workbook.
Calculate Monday's Date in the VBA Macro
Use the current date and its weekday number to calculate Monday, then format C4 as a date.
Weekday(Date, 2) returns a number from 1 for Monday to 7 for Sunday. Subtracting that number from the current date and adding 1 gives the date of the current week's Monday.
In Excel, select Developer > Visual Basic, or press Alt+F11 where available.
In the VBA editor, open the existing macro or select Insert > Module and enter: Sub SetMonday() Range("C4").Value = Date - Weekday(Date, 2) + 1 End Sub
Return to the intended worksheet, select Developer > Macros, choose SetMonday, and select Run. The unqualified Range reference updates C4 on the active sheet.
Select C4, open Home > Number Format, and choose Short Date or Long Date.

Calculate the Current Week's Monday in WPS Spreadsheet
WPS Office is a free, lightweight Office alternative with a familiar interface and support for Excel workbook formats, making it easy to move spreadsheet work. In WPS Spreadsheet, you can calculate Monday with a worksheet formula instead of relying on an Excel VBA macro.

Frequently Asked Questions
Why does my macro return a date in January 1900?
Weekday returns a number from 1 to 7, not a complete date. If the cell is formatted as a date, Excel displays that number as an early date serial. Calculate the date with Date - Weekday(Date, 2) + 1 instead.
Will the macro return today if today is Monday?
Yes. Weekday(Date, 2) returns 1 on Monday, so Date - 1 + 1 equals today's date.
How can I update C4 on a specific worksheet?
Qualify the range with the worksheet name, for example: ThisWorkbook.Worksheets("Sheet1").Range("C4").Value = Date - Weekday(Date, 2) + 1. Replace Sheet1 with the intended sheet name.
Can I calculate Monday without a macro?
Yes. Enter =TODAY()-WEEKDAY(TODAY(),2)+1 in C4 in Excel or WPS Spreadsheet, then use the Number Format menu on the Home tab to display it as a date.
Can I run this VBA macro in Excel for the web?
Excel for the web does not run VBA macros. Open the workbook in a desktop version of Excel to run the macro, or use the worksheet formula instead.




