View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default number or working days

=IF(OR(B16="",C16=""),"",((C16-WEEKDAY(C16,2)+WEEKDAY(B16,2)-B16)/7*5-MIN(5,WEEKDAY(B16,2))+MIN(5,WEEKDAY(C16,2))+(WEEKD AY(B16,2)<5))*7.4)

--
__________________________________
HTH

Bob

"Gibbyky2" wrote in message
...
Thanks rick

that worked great, now when i copy the formula down a range of cells iit
shows 7.4 when the date cells are blank.
can you advise how i hide value in one cell if other 2 cells are blank

ie: b14 and c14 usually have dates and d15 has formula/result. if a1 and
a2
have no dates i would like a3 to be blank.
the formula i am now using is as follows
=((C14-WEEKDAY(C14,2)+WEEKDAY(B14,2)-B14)/7*5-MIN(5,WEEKDAY(B14,2))+MIN(5,WEEKDAY(C14,2))+1)*7.4

"Rick Rothstein" wrote:

The difference is that between subtracting two numbers and counting
between
two numbers (the difference between 1 and 5 is 4, but there are 5 numbers
to
be counted); or, in other words, the difference is in whether you count
both
end days or not. Anyway, the fix is easy... just add 1 to Jacob's formula
(that is, put +1 at the very end of what you are now using.

--
Rick (MVP - Excel)


"Gibbyky2" wrote in message
...
Jacob kindly gave me the following formula for working out number of
working
days between 2 dates. it is exactly what i was looking for but it seems
to
calculate a day less

formula
=(C16-WEEKDAY(C16,2)+WEEKDAY(B16,2)-B16)/7*5-MIN(5,WEEKDAY(B16,2))+MIN(5,WEEKDAY(C16,2))

where c16 is 17th july 2009 and B16 is 13th july 2009

the formula works out 4 days but it should be 5 days

i am also looking to calculate the number of days (in this case 5) by
7.4

many thanks