View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
barry houdini[_20_] barry houdini[_20_] is offline
external usenet poster
 
Posts: 1
Default adding days from one cell with a date in it to another cell


cufc1210;456656 Wrote:
i have a spredsheet where i put a date in one cell and i want it to add
5days
..6.7.8.etc up to 15 days but i dont want it to include sundays is
this
possible

for example start date 01/07/09 add 15 days not including sundays
finish
date will be 17/07/09

I also have one that needs to discount saturday and sunday


If you add 15 days to 1/7/2009, not including Sundays then I make that
18/7/2009 (unless you are including the start date)

To do that with a formula you can use

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

where A1 is the start date and B1 the number of days to add, e.g. 15

If you want to include the start date then change references to A1 to
A1-1 i.e.

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


--
barry houdini
------------------------------------------------------------------------
barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=126400