Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm stuck - I have a variable Starttime that I want to check against Now(). If more than "00::02:30" elapses I want to do something. If Now-Starttime "00:02:30" then do something end if What would the proper syntax be? TIA Martha |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
have a look at: http://www.cpearson.com/excel/ontime.htm -- Regards Frank Kabel Frankfurt, Germany Martha wrote: Hi, I'm stuck - I have a variable Starttime that I want to check against Now(). If more than "00::02:30" elapses I want to do something. If Now-Starttime "00:02:30" then do something end if What would the proper syntax be? TIA Martha |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Time is held as a fraction of one days, so 2:30 is 2.5 hours or 2.5/24. So
just use If Now - StartTime (2.5/24) Then ... -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Martha" wrote in message ... Hi, I'm stuck - I have a variable Starttime that I want to check against Now(). If more than "00::02:30" elapses I want to do something. If Now-Starttime "00:02:30" then do something end if What would the proper syntax be? TIA Martha |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a bunch Bob,
I meant 2 1/2 minutes but the concept works like a charm!!! Thanks again, MArtha -----Original Message----- Time is held as a fraction of one days, so 2:30 is 2.5 hours or 2.5/24. So just use If Now - StartTime (2.5/24) Then ... -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Martha" wrote in message ... Hi, I'm stuck - I have a variable Starttime that I want to check against Now(). If more than "00::02:30" elapses I want to do something. If Now-Starttime "00:02:30" then do something end if What would the proper syntax be? TIA Martha . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And that is what you showed, my mistake. Glad it helped though.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Martha" wrote in message ... Thanks a bunch Bob, I meant 2 1/2 minutes but the concept works like a charm!!! Thanks again, MArtha -----Original Message----- Time is held as a fraction of one days, so 2:30 is 2.5 hours or 2.5/24. So just use If Now - StartTime (2.5/24) Then ... -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Martha" wrote in message ... Hi, I'm stuck - I have a variable Starttime that I want to check against Now(). If more than "00::02:30" elapses I want to do something. If Now-Starttime "00:02:30" then do something end if What would the proper syntax be? TIA Martha . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User Defined Function Syntax | Excel Worksheet Functions | |||
Trying to select a specific range based on the time value of user form input | New Users to Excel | |||
VBA - Measuring Time -subsecond | Excel Discussion (Misc queries) | |||
User Form That Calculates Time Length and Fills In Other Informati | Excel Worksheet Functions |