![]() |
Is there a TimeDiff function?
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 |
Is there a TimeDiff function?
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) -- HTH. Best wishes Harald Followup to newsgroup only please "Hafeez Esmail" skrev i melding ... 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 |
Is there a TimeDiff function?
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 Esmail wrote: 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 |
Is there a TimeDiff function?
=Mod(A2-A1,1)<=TimeValue("00:02:00")
Assumes the start time is in A1 and End time in A2 -- Regards, Tom Ogilvy "Hafeez Esmail" wrote in message ... 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 |
Is there a TimeDiff function?
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 Esmail wrote: 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 . |
All times are GMT +1. The time now is 03:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com