Adding days to a date, but excluding weekends & pub holidays

Zabman

Board Regular
Joined
Apr 7, 2010
Messages
77
Hi,

I am trying to develop a formula that adds 3 working days to a formula if the date stamp is after 10am, and 2 days if it is before. The cell containing the time I want to modify is E2. I have the following, but cannot work out how to rule out the weekends! I am sure networkdays is the way to go due to the public holiday factor, but just cant get my head around it!

=IF(MOD(E2,1)>0.41667,INT(E2) + 3,INT(E2) + 2)
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi,

I am trying to develop a formula that adds 3 working days to a formula if the date stamp is after 10am, and 2 days if it is before. The cell containing the time I want to modify is E2. I have the following, but cannot work out how to rule out the weekends! I am sure networkdays is the way to go due to the public holiday factor, but just cant get my head around it!

=IF(MOD(E2,1)>0.41667,INT(E2) + 3,INT(E2) + 2)
Use the WOKDAY function...

=WORKDAY(E2,IF(HOUR(E2)>10,3,2),A1:A10)

Where A1:A10 is the list of holiday dates.

Note that the WORKDAY function requires the Analysis ToolPak add-in be installed if you're using a version of Excel prior to Excel 2007. If you enter the formula and get a #NAME? error look in Excel help for the WORKDAY function. It'll tell you how to fix the problem.
 
Last edited:
Upvote 0
Thanks for that. I had looked at that function, but ruled it out due to the public holiday thing, its quite important that holidays are excluded the same as weekends. Am I missing something with the weekday function?
 
Upvote 0
Thanks for that. I had looked at that function, but ruled it out due to the public holiday thing, its quite important that holidays are excluded the same as weekends. Am I missing something with the weekday function?
WORKDAY does have a holidays argument.

I think you're confusing the WEEKDAY function with the WORKDAY function.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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