Excel Formulae (Date Logic)

saatt79

New Member
Joined
Dec 17, 2017
Messages
5
Hi,

I need a formulae to calculate Due Date including Week-end and Excluding Holidays only


Input = Start Date and No. of Days


Output = Due Date


Logic = Start Date+No.of Days-Holidays (include Saturday and Sunday)
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to Mr Excel forum

Maybe something like this
=NETWORKDAYS.INTL(A2,A2+B2,"0000000",Holidays)

where
A2 = Start Date
B2 = No. of Days
Holidays = named range that contains the holidays

Hope this helps

M.
 
Upvote 0
Check if A2 is a real date (number)
Try in an empty cell
=ISNUMBER(A2)
tell us the result

M.
 
Upvote 0
To get a date as your output I think you need to use WORKDAY.INTL function like this:

=WORKDAY.INTL(A2,B2,"0000000",Holidays)

Where Holidays is a named range including your holiday dates

WORKDAY.INTL is available in Excel 2010 or later versions. For earlier versions you can use an array formula like this:

=SMALL(IF(COUNTIF(Holidays,A2+ROW(INDIRECT("1:"&B2*5)))=0,ROW(INDIRECT("1:"&B2*5))),B2)+A2

confirm with CTRL+SHIFT+ENTER
<strike>
</strike>
 
Upvote 0
saatt79

I misunderstood the question that was very clear: you do want a date as output (do not know where my mind was ..:confused:)
Use the formula suggested by Barry Houdini.

M.
 
Upvote 0
Hi Barry

Do you think this works on previous versions?
=A2+B2+SUMPRODUCT(--(Holidays>=A2),--(Holidays<=A2+B2))

M.
 
Upvote 0
Do you think this works on previous versions?
=A2+B2+SUMPRODUCT(--(Holidays>=A2),--(Holidays<=A2+B2))

Hello Marcelo,

No, I think the problem with that is that you are assuming the end date (A2+B2) and then adding the number of holidays....but what if there are more holidays between A2+B2 and the new end date?

E.g. A2 = 20/12/2017 and B2 = 5 with holidays on 25/12 and 26/12 - end date should be 27/12
 
Upvote 0
Thanks so much for your valuable contribution. I have just checked with one of my scenario to calculate due with your formulae and result seems to be incorrect. Below is the example I used,
Start Date = 12/6/2017 | No. of days = 3 | Holidays = 12/6,12/7,12/9,12/10

Due Date should be = 12/13... Below is the manual calculation for the result. Can you pls help...

12/6 - Holiday
12/7 - Holiday
12/8 - Day 0
12/9 - Holiday
12/10 - Holiday
12/11 - Day 1
12/12 - Day 2
12/13 - Day 3
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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