Excel Formula: Get Most Recent Day of Week
If there is a given date, how can you get the date of the most recent specific weekday based on the date in Excel? Here introduces a formula to quickly get it.
If you want to follow along with this tutorial, please download the example spreadsheet.
Generic formula:
Date-MOD(date-weekday_number,7) |
Syntaxt and Arguments
Date: the given date that is used to find the most recent day of week. |
Week_number: the number indicates which weekday you want to get. Excel assigns 1 to Sunday and 7 to Saturday. For example, to get the most recent Monday, the weekday_number is 2. |
Return Value
The formula returns a 5-digit number. Since Excel stores dates as numbers, for getting a visual date, you can show the formula result in date format.
How this formula works
To get the most recent Thursday based on the date in cell B3, please use below formula:
=B3-MOD(B3-5,7) |
Press Enter key.
Then go to Number Format list to choose Short Date or Long Date as you need in the Number group under Home tab.
Explanation
MOD function: returns the remainder of two numbers after division.
Remark
1 This formula gets the most recent weekday in past.
2 If you want to automatically get the most recent weekday from today, use below formula:
=TODAY()-MOD(TODAY()-weekday_number,7)
Relative Formulas
- Get fiscal quarter from date
Generally, the fiscal quarter starts in a month other than January for most companies. In this case, how can you get the fiscal quarter based on the given date in Excel? - Get fiscal year from date
To count the days between today and each expiration date in Excel by formula - Display current date or time
This tutorial provides formulas to show the current date or time in Excel. - Create weekly date range
In this tutorial, it provides a formula to quickly get the weekly date range in Excel.
Relative Functions
- Excel WEEKNUM Function
Returns the week number of the given date in a year - Excel YEAR Function
Returns the year of date in 4-digit serial number format - Excel MONTH Function
The MONTH is used to get the month as integer number (1 to 12) from date - Excel DAY Function
DAY function gets the day as a number (1 to 31) from a date - Excel NOW Function
Get the current time and date
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
