Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM


All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"