NxNWKDY - Date of the N-th Weekday in a Month

Returns the serial number of the n-th weekday in a month. If the target weekday falls on a holiday, users can adjust the day to the next or prior workday.

 

Syntax

NxNWKDY(Weekday, Order, Month, Year)

Weekday is the weekday (i.e. 1=Sunday, 2=Monday, 3=Tuesday, ..., 7=Saturday)

Order is the n-th occurrence in the month (i.e. 1=First, 2=Second, 3=Third, 4=Fourth and -1=Last). If missing, order=1 is assumed.

Month is the month in the year expressed as a number (i.e. 1=Jan, 2=Feb, ..., 12=Dec), month name/abbrev. If missing, the current month is used.

Year is the target year (2 or 4 digits) (e.g. 99, 2007, 2008, 09, etc.). If missing, the current year is used.

 

Remarks

  1. Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
  2. Most functions automatically convert date values to serial numbers.
  3. If WEEKDAY is not a valid day (i.e. bad weekday name/abbrev. or a number greater than 7 or less than one), NxNWKDAY returns the #VALUE! error value.
  4. If Order is not a valid value (i.e. greater than 4 or less than one), NxNWKDAY returns the #VALUE! error value.
  5. If Month is not a valid value (i.e. bad month name/code/abbrev. or a number greater than 12 or less than one), NxNWKDAY returns the #VALUE! error value.

Examples

  Formula Description (Result)
  =NxNWKDAY(2,1,12,2012) 12/03/2012
  =NxNWKDAY("Saturday",2,"Dec",7) 12/08/2007
  =NxNWKDAY("Tues",3,5,96) 05/21/1996
  =NxNWKDAY("Tues",3,"Jul",1) 07/17/2001

Files Examples

References

External Links

Have more questions? Submit a request

0 Comments