View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default Calculate if 2 times differ by 24 hours?

I'm sorry if I confused anyone. I am actually interested
if the time (in B1) and the date (in B2) exceeds or is
GREATER than the time (in A1) and date (in A2) by
more than "24 hours".

Thanks for the formulas. I will give them a try!

8)

"joeu2004" wrote in message
...
On Dec 27, 11:41 pm, joeu2004 wrote:
=IF(ABS(A1+A2-B1-B2)1,"24 hr","<=24 hr")

[....]
=IF(ROUND(ABS(A1+A2-B1-B2)*86400,0)86400,"24 hr","<=24 hr")


I'm sorry. I read your subject ("differ by 24 hours") and overlooked
what you wrote in your posting ("B1 and B2 are greater [...] by more
than 24 hours").

For the latter, the formulas should be:

=IF(B1+B2-A1-A21,"24 hr","<=24 hr")

=IF(ROUND((B1+B2-A1-A2)*86400,0)86400,"24 hr","<=24 hr")