WORKDAY

IvanYerk

Board Regular
Joined
Aug 26, 2018
Messages
61
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Boy I can tie my mind up in knots. I appreciate when this extremely awesome group putting good karma out into the universe can help untie it.

I want to return the 1st of the month, BUT if it falls on weekend or holiday, I want it to find the last working day prior. For example - in April 2023, 4/1 was on a saturday. I want it to find the first prior working day that isn't a weekend or holiday. So it returns March 31st.

Where I'm stuck is January 2024 when the 1st is on a Monday AND it's a holiday. So I need the formula to return December 29th. Or even if January 1st was a Wednesday, how do I get it to return 12/31?

I was using If/Then Weekday 7 or 1, go back 1 day or 2 days, respectively. But I'm not sure how to add the workday/holiday part to the formula.

Thanks so much as always!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about
Fluff.xlsm
ABCD
1
211/04/202331/03/202301/01/2024
313/01/202429/12/2023
4
5
Main
Cell Formulas
RangeFormula
B2:B3B2=WORKDAY(EOMONTH(A2,-1)+2,-1,$D$2:$D$10)
 
Upvote 1
Thanks Fluff, looks like it's working like a charm. Many thanks! It was the +2 that did the trick. Love it!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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