add dates

Likeexcel

Active Member
Joined
Sep 2, 2009
Messages
308
Hello:
Not sure if there is a formula that in any given calendar dates it know would add weekend days and holidays.

For instance,if we ship something on 9/28 wednesday and it takes 4 business days to get to the customer, so it gets to the customer on tuesday 10/4.
However if i added 4 days to 2011-09-28, it gives me 2011-10-02(Sunday) because it's including weekend days. i need a formula that says on any given date plus the 4 business days to ship then give me the date, but if that date falls on a weekend or holiday dates then add the extra weekend dates or holidays, so the return date is on a working date.

not sure if this is possible, may need to have extra table for the calendar dates?

thank you in advance.
 
Hello Neil ....I suppose it depends on your definition of "same month" - assuming that it must be the exact same calendar month, i.e. the same month in the same year - then my method would do that, comparing just the month, of course, won't ensure that the months are in the same year....

Barry, good point.

I suppose for completeness, I should have used:
=IF((YEAR(A1)=YEAR(B1))*(MONTH(A1)=MONTH(B1)),"OK","")
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
All works good to me. WOW, I'm just learning new things everyday from this board :) Again Many thanks for all the help.
 
Upvote 0
Try

=WORKDAY(A1,4,E1:E20)

Where A1 is your start date
4 is number of working days to add
E1:E20 is an OPTIONAL range containing holidays to be excluded as well.

This requires the Analysis toolpack from Tools - Addins


Hope that helps.

Hi Jon: What about this?
currently i have this formula
IF(R29="","",WORKDAY(N29,VLOOKUP(E29, Y:AG,9,FALSE),$U$5:$U$118))<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Column N is ship date.<o:p></o:p>
<o:p> </o:p>
Column E is customer #<o:p></o:p>
Column U is a list of days I want to not include (i.e list of weekend dates and US holidays).<o:p></o:p>
<o:p> </o:p>
I want to add a column to identify which customer is international and which one is domestic ( I have that list).<o:p></o:p>
<o:p> </o:p>
Now with the formula above, could I also add that if it’s international customers exclude these list of holidays days and if it’s US customers then exclude a different list of holidays?<o:p></o:p>
<o:p> </o:p>
Thank you in advance.
sorry for all the questions.<o:p></o:p>
 
Upvote 0
Firstly, you don't need to include weekend dates in the column U list - WORKDAY excludes weekends anyway - you only need to list MF dates that need to be excluded

Assuming you list US holidays in V5:V118 (with existing list in U5:U118 for International) then with INT or US in column S try this version

=IF(R29="","",WORKDAY(N29,VLOOKUP(E29, Y:AG,9,FALSE),IF(S29="US",$V$5:$V$118,$U$5:$U$118)))
 
Upvote 0
Firstly, you don't need to include weekend dates in the column U list - WORKDAY excludes weekends anyway - you only need to list MF dates that need to be excluded

Assuming you list US holidays in V5:V118 (with existing list in U5:U118 for International) then with INT or US in column S try this version

=IF(R29="","",WORKDAY(N29,VLOOKUP(E29, Y:AG,9,FALSE),IF(S29="US",$V$5:$V$118,$U$5:$U$118)))

so if S29="US", THEN COLUMN V for domestic days
IF S=29="INT" THEN COLUMN U for international days

thank you again.
 
Upvote 0

Forum statistics

Threads
1,225,155
Messages
6,183,212
Members
453,151
Latest member
Lizamaison

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