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

Excel Formula: Get Nth Day of Week in Month By Given Date

doc convert date to julia 1

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

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

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

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

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