Note: The other languages of the website are Google-translated. Back to English
English English

Excel Formula: Get Most Recent Day of Week

doc convert date to julia 1

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.
doc convert date to julia 1

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.
doc convert date to julia 1

Then go to Number Format list to choose Short Date or Long Date as you need in the Number group under Home tab.
doc convert date to julia 1

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

Relative Functions


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations