View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Help need formula for working out date overlaps

Not all of them, just one I think

=MAX(0,MIN(KeyDateEnd,$B2)-MAX(KeyDateStart,$A2))+1

Is Herbert Seidenberg and liztownsend one and the same?


--
__________________________________
HTH

Bob

"Herbert Seidenberg" wrote in message
...
The problem is that
1/11/08 to 30/11/08
when fully expanded reads:
1/11/08 12:00 AM to 30/11/08 12:00 AM
What we really want is:
1/11/08 00:00 to 30/11/08 24:00
which shortens to:
1/11/08 to 1/12/08
If we correct all the end dates this way and
remove all the +1's in Bob's formula, everything works.
Ron's formula now fails and it has problems
if we include odd times.