Excel Formula: Get Nth Day of Week in Month By Given Date
As we known, we can use a formula to get the weekday of a given date in Excel, but most of you do not know there is also a formula can get the nth weekday of a given date.
If you want to follow along with this tutorial, please download the example spreadsheet.
Generic formula:
date-DAY(date)+1+n*7-WEEKDAY(date-DAY(date)+8-dow) |
Syntaxt and Arguments
Date: the date that you want to find the nth weekday based on. |
N: An integer that indicates the nth weekday you want to find based on the given date. For instance, you want to find the second specific weekday, use number 2 in the formula. |
Dow: The integer 1-7 indicates the weekday that you want to find from the given date. |
Dow; | Weekday |
1 | Sunday |
2 | Monday |
3 | Tuesday |
4 | Wednesday |
5 | Thursday |
6 | Friday |
7 | Saturday |
Take Attention
Usually, the argument N is in the scale of the integer 1-4, if you want to find the fifth specific weekday, supposing the 5th Tuesday of 1/1/2021, it will get the first Tuesday of the next month, 2/2/2021.
Return Value
The formula returns a serial number, you need to format it as date format.
How the formula works
A table B3:D5, column B3:B4 lists the date that you used to find the weekday based on, C3:C5 contains the numbers that indicate the specific weekday you want to get, D3:D5 tell you the nth weekday you need to find. Please use the formula in cell F3 as below:
=B3-DAY(B3)+1+D3*7-WEEKDAY(B3-DAY(B3)+8-C3) |
Press Enter key to get the first serial number result, then drag auto fill handle down to cell F5.
Then keep the results selected, go to Home tab, and choose the Short Date or Long Date from the drop-down list of Number Format.
Explanation
WEEKDAY function: returns an integer number from 1 to 7 to represent the day of the week for a given date in Excel.
DAY function: gets the day as a number (1 to 31) from a date.
=B3-DAY(B3)+1+D3*7-WEEKDAY(B3-DAY(B3)+8-C3)
=B3-DAY(B3)+1+D3*7-WEEKDAY(B3-3+8-1)
=B3-DAY(B3)+1+D3*7-WEEKDAY(1/7/2021)
=B3-DAY(B3)+1+D3*7-5
=1/3/2021-3+1+7-5
=1/3/2021
Relative Formulas
- Find next date in schedule list
Supposing you have a table with two columns in Excel, one contains the schedule contents, the other contains the schedule date, now you want to find the next date in the schedule based on today... - Find earliest date and latest date for each group
In this tutorial, it provides formulas to find the earliest date and latest date for each group in Excel. - Gount days between two days
To count the number of days or months or years between two given dates will be easy in Excel after you reading this tutorial - 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 WORKDAY Function
Adds workdays to the given start date and returns a workday - Excel WEEKDAY Function
Get day of the week as a number (1 to 7) 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.
