Note: The other languages of the website are Google-translated. Back to English
English English

Excel Formula: Get First or Last Workday in Month

doc convert date to julia 1

To find the first or last workday of month in the given date, you can use the formulas that combine the several functions.

If you want to follow along with this tutorial, please download the example spreadsheet.
doc convert date to julia 1

Get the first workday in month

 

Generic formula:

WORKDAY(DATE(YEAR(date),MONTH(date),1)-1,1)

Syntaxt and Arguments

Date: the date that you want to get the first workday of its month.

Return Value

The formula returns to a 5-digit serial number, you can format the result as date format for more directly viewing.

How this formula works

Cell B3 contains the date that you need to get the first workday of the month, please use below formula:

=EOMONTH(B3,-2)+1

Press Enter key to get the first serial number, then drag auto fill handle over the cells which need this formula.
doc convert date to julia 1
doc convert date to julia 1

Keep the results selected, click the arrow in the Number Format textbox under Home tab, in the expand drop-down list, choose Short Date or Long Date to format the results as dates.
doc convert date to julia 1

Explanation

MONTH function: gets the month as integer number (1 to 12) from date.

YEAR function: returns the year based on the given date in a 4-digit serial number format.

DATE function: creates date with year, month and day.

WORKDAY function: adds workdays to the given start date and returns a workday.

=WORKDAY(DATE(YEAR(B3),MONTH(B3),1)-1,1)
=WORKDAY(DATE(YEAR(B3),3,1)-1,1)
=WORKDAY(DATE(2020,3,1)-1,1)
=WORKDAY("2/29/2020",1)
=3/2/2020

Get the last workday in month

 

Generic Formula

WORKDAY(EOMONTH(date,0)+1,-1)

Syntax and Arguments

Date: the date that you want to get the last workday of its month.

Return Value

The formula returns to a 5-digit serial number, you can format the result as date format for more directly viewing.

How the formula works

For instance, the Cell B3 contains the date that you need to get the last workday of the month, please use below formula:

=WORKDAY(EOMONTH(B3,0)+1,-1)

Press Enter key to get the first serial number, then drag auto fill handle over the cells which need this formula.
doc convert date to julia 1
doc convert date to julia 1

Keep the results selected, click the arrow in the Number Format textbox under Home tab, in the expand drop-down list, choose Short Date or Long Date to format the results as dates.
doc convert date to julia 1

Explanation

EOMONTH function: gets the last day of month in future or past.

WORKDAY function: adds workdays to the given start date and returns a workday.

=WORKDAY(EOMONTH(B3,0)+1,-1)
=WORKDAY("4/1/2020",-1)
=3/31/2020


Relative Formulas

Relative Functions


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations