Skip to main content

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


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.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations