Return last working day of a month

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,600
Office Version
  1. 365
Platform
  1. Windows
Is it possible to easily return get the last working day of the month for months where Mon-Fri are not the workdays?

I have a tool where the user will select the workdays (Mon-Fri, Mon-Sat, Tue-Sat, Tue-Sun, etc) and I need to show the last working day of each month also taking into account any bank holidays.


Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Which version of Excel are you using?

XL2010 has Workday.INTL which you can specify the working days.
Example

=WORKDAY.INTL(A1,10,"1000001",Holidays)

That string "1000001" represents which days are working days / weekends.
Each number represents a day of the week, starting with MONDAY
1 = Weekend day
0 = Working day

so "1000001" makes Tuesday-Saturday working days

Hope that helps.
 
Upvote 0
I am using 2013 but I need it to be compatible with 2007 onward if possible
 
Upvote 0
I am using 2013 but I need it to be compatible with 2007 onward if possible
If you have the Analysis ToolPak add-in loaded in your copies of XL2007 (not needed for higher versions), you can use this formula...

=EOMONTH(A1,0)-MAX(0,WEEKDAY(EOMONTH(A1,0),2)-5)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,785
Messages
6,121,543
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top