Unable to skip sunday...while adding 4 days in a date in XL2007

sam143sta

New Member
Joined
Aug 4, 2011
Messages
17
Hi,

I require urgent help in solving my problem regarding my project in Excel 2007 using win-XP.

I hope you experts can help me getting instant solution to my problem.
______________________________________________________________



For Ex:

Dispatch Date is 01/01/2011 (Saturday) & Delivery date which should be 4 days later from the dispatch date.

Here Sunday is not a working day. It has to be skipped during the count.

please remember i only want to skip Sunday....

So please find me a solution/formula to solve this problem. :confused:

Thanks in advance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
welcome to MrExcel Board
Excel Workbook
C
301/01/2011
406/01/2011
Sheet2
Excel 2007
Cell Formulas
RangeFormula
C4=+C3+4+IF(SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(C3&":"&C3+4)))=1)),1,0)
 
Upvote 0
Cell A1 is dispatch date

Cell B1 =IF(WEEKDAY(A1)=1,"Date is a Sunday",IF(WEEKDAY(A1)+4<8,A1+4,A1+5))
 
Upvote 0
Thanks Yahya,

It works but i have one more if the dispatch date itself is sunday... then i need a output N.A. both in dispatch date and delivery date... how I get this output :confused: ?

For Ex:

Dispatch Date Day of Dispatch Date Delivery date
03/07/2010 Sunday 3/12/2010

Need Output :
Dispatch Date Day of Dispatch Date Delivery date
N.A. Sunday N.A.

Can you please help me out for the same...

Thanks & Regards,
Sam
 
Upvote 0
try this
Excel Workbook
ABC
1Dispatch DateDay of DispatchDate Delivery date
203/07/2011Sunday#N/A
304/08/2011Thursday09/08/2011
Sheet5
Excel 2007
Cell Formulas
RangeFormula
C2=IF(WEEKDAY(A2)=1,NA(),A2+4+IF(SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&A2+4)))=1)),1,0))
 
Upvote 0
For a more generic formula......this allows you to add any number of days (in B1) to a date (in A1) while skipping only Sunday

=A1-WEEKDAY(A1,3)+INT(7/6*(B1+MIN(5,WEEKDAY(A1,3))))
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

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