Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to count table columns in Excel
  • How To Insert and Customize Sparklines in Excel
  • How to create dynamic reference table name in Excel
  • How to Sort by Color in Excel
  • How To Create Pareto Chart in Excel

References

  • How to get address of first cell in range in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Excel Advanced Lookup using Index and Match Functions
  • How to get relative row numbers in a range in Excel
  • How to get last row in numeric data in Excel

Data Validations

  • Prevent invalid data entering in specific cells
  • Excel Data validation unique values only
  • Excel Data validation must not contain
  • Excel Data validation allow uppercase only
  • Excel Data validation specific characters only

Count day of week between dates in Excel

by

This tutorial shows how to Count day of week between dates in Excel using example below.

To count the number of Mondays, Fridays, Sundays, etc. between two dates you can use an array formula that uses several functions: SUMPRODUCT, WEEKDAY, ROW, and INDIRECT.

 Formula

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(date1&":"&date2)))=dow))

Explanation

In the example shown, the formula in cell E6 is

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(B6&":"&C6)))=D6))

How this formula works

At the core, this formula uses the WEEKDAY function to test a number of dates to see if they land on a given day of week (dow) and the SUMPRODUCT function to tally up the total.

When given a date, WEEKDAY simply returns a number between 1 and 7 that corresponds to a particular day of the week. With default settings, 1 = Sunday and 7 = Saturday. So, 2 = Monday, 6 = Friday, and so on.

The trick to this formula is understanding that dates in Excel are just serial numbers that begin on Jan 1, 1900. For example, January 1, 2016 is the serial number 42370, and January 8 is 42377. Dates in Excel only look like dates when a date number format is applied.

So, the question becomes – how can you construct an array of dates that you can feed into the WEEKDAY function to find out corresponding days of week?

The answer is to use ROW with INDIRECT like so:

ROW(INDIRECT(date1&":"&date2))

INDIRECT allows the concatenated dates “42370:42377” to be interpreted as row numbers. Then the ROW function returns an array like this:

{42370;42371;42372;42373;42374;42375;42376;42377}

The WEEKDAY function evaluates these numbers as dates and returns this array:

{6;7;1;2;3;4;5;6}

which is tested against the given day of week (6 in this case, from D6). Once the results of the test are converted to 1s and 0s with the double hyphen, this array is processed by SUMPRODUCT:

{1;0;0;0;0;0;0;1}

Which returns 2.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

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

Logical Functions

  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel
  • IF with boolean logic in Excel
  • Check multiple cells are equal in Excel

Date Time

  • Display the current date and time in Excel
  • Dynamic date list in Excel
  • How to get Weekdays, Working days between Two Dates in Excel
  • Count dates in current month in Excel
  • TIME function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group times into 3 hour buckets in Excel
  • Group numbers at uneven intervals in Excel
  • Group arbitrary text values in Excel
  • Categorize text with keywords in Excel
  • How to randomly assign data to groups in Excel

General

  • How to Delete Cells, Row and Rows in Excel
  • Subtotal invoices by age in Excel
  • AutoFit Column Width, AutoFit Row Height in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • Zoom Worksheet in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning