Calculating the Date of the Nth Specific WeekDay of the Month in Microsoft Excel 2010

In this article, we will learn how to calculate the date of the nth specific weekday of the month in Microsoft Excel 2010.

Consider a scenario in which you want to find out a formula that will show the date of Nth specific day weekday of the month.

We will use DATE & WEEKDAY functions to get the output.

DATE: Returns the number that represents the date in Microsoft Excel date-time code.

Syntax: =DATE(year,month,day)

year: The year argument can include one to four digits. By default, Excel uses the 1900 date system.

month: It is the second argument that represents the month of the year from 1 to 12 (January to December)

day: It isthe third argument that represents the day of the month from 1 to 31.

WEEKDAY: It returns a number from 1 to 7 identifying the day of the week of a date

Syntax: =WEEKDAY(serial_number,return_type)

serial_number: This represents the date of the day that you want to find.

return_type: This is optional. A number that determines the type of return value.

Let us take an example:

  • We have Year & Month in column C&D.
  • In column E, we want to find the date of first Saturday of the intersection of Year & Month.

 
Image1
 

  • In cell E5, formula would be
    =DATE(C5,D5,1+((1-(6>=WEEKDAY(DATE(C5,D5,1),2)))*7+(6-WEEKDAY(DATE(C5,D5,1),2))))
    

Image2

  • To check whether the formula has returned the correct output, we can use Text function.
  • In cell F5, formula would be
    =TEXT(E5,"dddd")
    

Image3

  • If we change the Year or Month, then our formula will return the date accordingly, say if we change the year to 2014

Image4

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.