Is there a TimeDiff function?

  • Thread starter Thread starter Hafeez Esmail
  • Start date Start date
H

Hafeez Esmail

I want to see if two times are <= 2 minutes. Is there a
function that does this (and takes the case where time1 =
23:58:01 and time2 = 0:00:01)?
Col A contains Dates and Col B contains Time

Thanks
Hafeez Esmail
 
Hi Hafeez

Subtract time like this (with start time in A1 and end time in B1)
=(B1-A1+(B1<A1))
For your need (<= 2 minutes) :
=(B1-A1+(B1<A1))<=(1/720)
 
Hi Hafeez,

Assuming the two dates are in A1 and A2 and the corresponding times are in
B1 and B2, this formula should do what you're looking for:

=ABS((A1+B1)-(A2+B2))<=TIME(0,2,0)

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
=Mod(A2-A1,1)<=TimeValue("00:02:00")

Assumes the start time is in A1 and End time in A2
 
Thanks Jake!!
Hafeez Esmail
-----Original Message-----
Hi Hafeez,

Assuming the two dates are in A1 and A2 and the corresponding times are in
B1 and B2, this formula should do what you're looking for:

=ABS((A1+B1)-(A2+B2))<=TIME(0,2,0)

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Hafeez said:
I want to see if two times are <= 2 minutes. Is there a
function that does this (and takes the case where time1 =
23:58:01 and time2 = 0:00:01)?
Col A contains Dates and Col B contains Time

Thanks
Hafeez Esmail

.
 
Back
Top