Finding the First and Last Workdays of a Month in Google Sheets

Published on

This post provides simple formulas to help you find the first and last workdays of any given month in Google Sheets.

You can determine these for the current month, the previous month, or any specified month.

To achieve this, we utilize the WORKDAY.INTL function in conjunction with EOMONTH function. In some cases, the TODAY and EDATE functions are also necessary.

But when do we need to use the TODAY and EDATE functions?

To identify the first and last workdays of the current, previous, or upcoming month, you will need to incorporate the TODAY function, the EDATE function, or both into the process.

Finding the Last Workday of the Current Month

To find the last workday of the current month in Google Sheets, enter this formula into any cell:

=WORKDAY.INTL(EOMONTH(TODAY(), 0) + 1, -1, "0000011")

The EOMONTH function returns the end-of-month date for the start_date, which is TODAY().

Syntax: EOMONTH(start_date, months)

Setting months to 0 and start_date to TODAY() ensures it returns the last day of the current month. Adding 1 to this result gives the first day of the next month.

The WORKDAY.INTL function uses this date as the start_date and moves num_days backwards by 1 working day (-1).

Syntax: WORKDAY.INTL(start_date, num_days, [weekend], [holidays])

The weekend parameter uses a sequence of seven digits (Monday through Sunday), where each digit represents whether the day is considered a workday (0) or a weekend/holiday (1).

In this context, “0000011” signifies that Saturday and Sunday are considered weekends. Adjust this sequence according to your specific weekend configuration.

Finding the First Workday of the Current Month

To find the first workday of the current month, use this formula:

=WORKDAY.INTL(EOMONTH(TODAY(), -1), 1, "0000011")

The EOMONTH function returns the last day of the previous month (TODAY() with months as -1). WORKDAY.INTL then advances 1 working day from this date, giving you the first workday of the current month.

Using a Specific Date Instead of TODAY

With minimal changes to the formulas above, you can determine the first and last workdays for a specific date.

Replace TODAY() in the formulas with the specific date in the format DATE(year, month, day) or reference the date from a specific cell.

For example, to find the last workday of December 2024, use this formula:

=WORKDAY.INTL(EOMONTH(DATE(2024, 12, 1), 0)+1, -1, "0000011")

To find the first workday of January 2025, use this formula:

=WORKDAY.INTL(EOMONTH(DATE(2025, 1, 1), -1), 1, "0000011")

Finding the First and Last Workdays of the Previous or Next Month

In this case, we will use the EDATE function with the TODAY function. This combination returns a date that is a specified number of months before or after the current date.

In our earlier formulas, we need to replace TODAY with EDATE as follows:

This formula returns the last workday of the previous month:

=WORKDAY.INTL(EOMONTH(EDATE(TODAY(), -1), 0)+1, -1, "0000011")

And this one returns the first workday of the previous month:

=WORKDAY.INTL(EOMONTH(EDATE(TODAY(), -1), -1), 1, "0000011")

To find the last workday of the next month, use this formula:

=WORKDAY.INTL(EOMONTH(EDATE(TODAY(), 1), 0)+1, -1, "0000011")

This formula returns the first workday of the next month:

=WORKDAY.INTL(EOMONTH(EDATE(TODAY(), 1), -1), 1, "0000011")

Resources

Here are some additional resources:

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Real-Time Excel Filtering Using Combo Box & FILTER Function

In this tutorial, you’ll learn how to set up real-time Excel filtering using a...

Google Sheets: Extract Top N per Group from Query Aggregation

When working with grouped and aggregated data in Google Sheets, you might need to...

How to Extract Top N from Aggregated Query Results in Google Sheets

To summarize data in Google Sheets, you can use the QUERY function. However, if...

How to Use RANK IF in Google Sheets (Conditional Ranking)

You can use the RANK function to rank values in an entire dataset. But...

More like this

Google Sheets: Extract Top N per Group from Query Aggregation

When working with grouped and aggregated data in Google Sheets, you might need to...

How to Extract Top N from Aggregated Query Results in Google Sheets

To summarize data in Google Sheets, you can use the QUERY function. However, if...

How to Use RANK IF in Google Sheets (Conditional Ranking)

You can use the RANK function to rank values in an entire dataset. But...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.