Adding calendar days but result needs to be preceding business day

aliecat08

New Member
Joined
Oct 18, 2017
Messages
14
Office Version
  1. 2013
Platform
  1. Windows
I need to calculate various deadlines that either add or subtract calendar days to a specific date in a cell, but the result must be the first preceding business day if it lands on a weekend or holiday (I have a separate sheet in same workbook that lists all the holidays through 2026)

For example, if I need to add 30 calendar days to 11/24/2023, it'll be 12/24/2023, which is a holiday so the result should be 12/22/2023.

Any help is much appreciated!!!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I used Let which you may not have.

Just expand the formula so that you do not need to use Let.

try
Workdays.xlsm
ABCDEF
1Holidays
224-Nov-2330Fri 22-Dec-2324-Dec-23
3
5a
Cell Formulas
RangeFormula
D2D2=LET(d,WORKDAY.INTL(B2,30,"0000000",Holidays),IF(d>B2+30,WORKDAY.INTL(d,-1,1,Holidays)))
Named Ranges
NameRefers ToCells
'5a'!Holidays='5a'!$F$2D2


or

Workdays.xlsm
ABCDEF
1Holidays
224-Nov-2330Fri 22-Dec-2324-Dec-23
3
5a
Cell Formulas
RangeFormula
D2D2=LET(d,WORKDAY.INTL(B2,30,"0000000",Holidays),IF(d>B2+30,WORKDAY.INTL(d,-1,"1111011",Holidays)))
Named Ranges
NameRefers ToCells
'5a'!Holidays='5a'!$F$2D2
 
Upvote 0
Workdays.xlsm
ABCDEF
1Holidays
224-Nov-2330Fri 22-Dec-2324-Dec-23
324-Nov-233024-Dec-23Fri 22-Dec-23
424-Nov-2330Fri 22-Dec-23
5a
Cell Formulas
RangeFormula
D2D2=LET(d,WORKDAY.INTL(B2,30,"0000000",Holidays),IF(d>B2+30,WORKDAY.INTL(d,-1,1,Holidays)))
D3D3=B3+C3
E3E3=IF(D3=Holidays,WORKDAY.INTL(D3,-1,1,I2))
E4E4=IF(B4+C4=Holidays,WORKDAY.INTL(B4+C4,-1,1,Holidays))
Named Ranges
NameRefers ToCells
'5a'!Holidays='5a'!$F$2D2, E3:E4
 
Upvote 0
Workdays.xlsm
BCD
524-Nov-2330Fri 22-Dec-23
6
5a
Cell Formulas
RangeFormula
D5D5=WORKDAY(B5+C5+1,-1,Holidays)
Named Ranges
NameRefers ToCells
'5a'!Holidays='5a'!$F$2D5
 
Upvote 0
Solution
Workdays.xlsm
BCD
524-Nov-2330Fri 22-Dec-23
6
5a
Cell Formulas
RangeFormula
D5D5=WORKDAY(B5+C5+1,-1,Holidays)
Named Ranges
NameRefers ToCells
'5a'!Holidays='5a'!$F$2D5

YESSS!! This is it.

I have a question though, just so I understand the concept behind the formula, what do the +1 , and -1, do?
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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