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:
- Calculate Day Wise Working Hours in Google Sheets
- Find the Number of Working and Non-Working Days in Google Sheets
- Return All Working Dates Between Two Dates in Google Sheets
- How to Highlight Next N Working Days in Google Sheets
- Finding the Last 7 Working Days in Google Sheets (Array Formula)
- Last Working Day of a Given Year – Google Sheets Formula