Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get address of first cell in range in Excel
  • How to use Excel MATCH Function
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • Two-column Lookup in Excel

Data Analysis Examples

  • How to count table rows in Excel
  • How to calculate current stock or inventory in Excel
  • Understanding Pivot Tables in Excel
  • Use Data Form to input, edit and delete records in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel

Data Validation Examples

  • Excel Data validation specific characters only
  • Excel Data validation must contain specific text
  • Data validation must not exist in list
  • Excel Data validation number multiple 100
  • Excel Data validation whole percentage only

How to calculate nth day of week in month in Excel

by

To get the nth day if week in a month (i.e. the first Tuesday, third Tuesday, forth Thursday, etc.) you can use a formula based on the DAY and WEEKDAY functions.

Formula

=date-DAY(date)+1+n*7-WEEKDAY(date-DAY(date)+8-dow)

Note:  Day of week is abbreviated “dow” in the generic form of the formula. This is a number between 1 (Sunday) and 7 (Saturday) which can be changed as needed.

Worked Example:   Get work hours between dates custom schedule in Excel

Explanation

In the example shown, the formula in E5 is:

=B5-DAY(B5)+1+D5*7-WEEKDAY(B5-DAY(B5)+8-C5)

How this formula works

First, this formula determines a “start date”. The “first of month” is calculated with the DAY function here:

=B5-DAY(B5)+1

Then  n * 7 days to the first of the month, to get a start date n weeks from the first of the month. In the generic form of the formula, n represents “nth”.

Worked Example:   Roll back weekday to Friday base on a particular date in Excel

The next step is to calculate the adjustment required to reach the final result. The adjustment is calculated using WEEKDAY and DAY:

WEEKDAY(B5-DAY(B5)+8-C5)

Inside WEEKDAY, the first of the month is again calculated, then 8 days are added and the value for dow (day of week) is subtracted.

Worked Example:   OR function Examples in Excel

Finally the calculated adjustment is subtracted from original start date to get the final result.

Post navigation

Previous Post:

How to calculate percent of year complete in Excel

Next Post:

How to calculate months between dates in Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to convert numbers to text using TEXT function in Excel
  • How to extract domain from email address in Excel
  • How to extract name from email address in Excel
  • How to get top level domain (TLD) in Excel
  • ASC function: Description, Usage, Syntax, Examples and Explanation
  • Basic timesheet formula with breaks in Excel
  • Display Days until expiration date in Excel
  • Dynamic date list in Excel
  • Series of dates by day
  • Get days before a date in Excel
  • FVSCHEDULE function: Description, Usage, Syntax, Examples and Explanation
  • ACCRINT function: Description, Usage, Syntax, Examples and Explanation
  • DISC function: Description, Usage, Syntax, Examples and Explanation
  • TBILLYIELD function: Description, Usage, Syntax, Examples and Explanation
  • Calculate payment periods for loan in Excel
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles