Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How is time represented? How do i make an equation representing 5 minutes?
Fist off, big thanks to Chip Pearson who answered my last querry here
with a pointer to his site-- great stuff there, thanks! Here is my next problem-- simple I am sure, but i haven't a clue... In Cell e1 I have a time, in one of the standard time formats. I need to run some code if the current time is at least 5 minutes later than the time in e1. The IF, THEN statement seems obvious enough, but what goes in the place of the question marks below? Does each numeral equal a second, so for 5 minutes it would be 60*5, or 300? Apparently not, 300 doesn't = 5 minutes I have fingured out through trial and error.... So what should go in place of the question marks below to equal 5 minutes?? Arggg!!!! Thanks in advance for the help and/or explanation! If (Now() (e1 + ????)) Then |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How is time represented? How do i make an equation representing 5 minutes?
Hi R,
1 Day = 24 Hours 1 Hour = 60 Mins Therefo 5 Mins = (1/24/60)*5 --- Regards, Norman "R" wrote in message ... Fist off, big thanks to Chip Pearson who answered my last querry here with a pointer to his site-- great stuff there, thanks! Here is my next problem-- simple I am sure, but i haven't a clue... In Cell e1 I have a time, in one of the standard time formats. I need to run some code if the current time is at least 5 minutes later than the time in e1. The IF, THEN statement seems obvious enough, but what goes in the place of the question marks below? Does each numeral equal a second, so for 5 minutes it would be 60*5, or 300? Apparently not, 300 doesn't = 5 minutes I have fingured out through trial and error.... So what should go in place of the question marks below to equal 5 minutes?? Arggg!!!! Thanks in advance for the help and/or explanation! If (Now() (e1 + ????)) Then |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How is time represented? How do i make an equation representing 5 minutes?
Hmmm, thanks Norman, but maybe I am missing something!
When I plug that in, or (.003472222) the If, THEN doesn't work at all. If in E1 I have "Oct 7, 2004 11:10 pm" and I use: If (Now() (e1 + (.003472222)) Then Do xyz It will do xyz even if the time NOW() = "Oct 7, 2004 11:12" I need it to only do xyz if the time is 5 minutes later than E1, or AFTER "Oct 7, 2004 11:15 pm" in this example.... Sorry if I am thick trying to figure this out, I am pretty new to VBA and am honsetly kind of lost here. On Fri, 8 Oct 2004 03:54:58 +0100, "Norman Jones" wrote: Hi R, 1 Day = 24 Hours 1 Hour = 60 Mins Therefo 5 Mins = (1/24/60)*5 --- Regards, Norman "R" wrote in message .. . Fist off, big thanks to Chip Pearson who answered my last querry here with a pointer to his site-- great stuff there, thanks! Here is my next problem-- simple I am sure, but i haven't a clue... In Cell e1 I have a time, in one of the standard time formats. I need to run some code if the current time is at least 5 minutes later than the time in e1. The IF, THEN statement seems obvious enough, but what goes in the place of the question marks below? Does each numeral equal a second, so for 5 minutes it would be 60*5, or 300? Apparently not, 300 doesn't = 5 minutes I have fingured out through trial and error.... So what should go in place of the question marks below to equal 5 minutes?? Arggg!!!! Thanks in advance for the help and/or explanation! If (Now() (e1 + ????)) Then |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How is time represented? How do i make an equation representing 5 minutes?
Hi R,
In VBA. try: If Now Range("E1").Value + TimeSerial(0, 5, 0) Then --- Regards, Norman "R" wrote in message ... Hmmm, thanks Norman, but maybe I am missing something! When I plug that in, or (.003472222) the If, THEN doesn't work at all. If in E1 I have "Oct 7, 2004 11:10 pm" and I use: If (Now() (e1 + (.003472222)) Then Do xyz It will do xyz even if the time NOW() = "Oct 7, 2004 11:12" I need it to only do xyz if the time is 5 minutes later than E1, or AFTER "Oct 7, 2004 11:15 pm" in this example.... Sorry if I am thick trying to figure this out, I am pretty new to VBA and am honsetly kind of lost here. On Fri, 8 Oct 2004 03:54:58 +0100, "Norman Jones" wrote: Hi R, 1 Day = 24 Hours 1 Hour = 60 Mins Therefo 5 Mins = (1/24/60)*5 --- Regards, Norman "R" wrote in message . .. Fist off, big thanks to Chip Pearson who answered my last querry here with a pointer to his site-- great stuff there, thanks! Here is my next problem-- simple I am sure, but i haven't a clue... In Cell e1 I have a time, in one of the standard time formats. I need to run some code if the current time is at least 5 minutes later than the time in e1. The IF, THEN statement seems obvious enough, but what goes in the place of the question marks below? Does each numeral equal a second, so for 5 minutes it would be 60*5, or 300? Apparently not, 300 doesn't = 5 minutes I have fingured out through trial and error.... So what should go in place of the question marks below to equal 5 minutes?? Arggg!!!! Thanks in advance for the help and/or explanation! If (Now() (e1 + ????)) Then |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How is time represented? How do i make an equation representing 5 minutes?
Wow!!! Perfect!! Thanks so much Norman-- really mega thanks, you have
no idea how much i appreciate your help! It works, it works!! YEAH!!! On Fri, 8 Oct 2004 04:44:14 +0100, "Norman Jones" wrote: Now Range("E1").Value + TimeSerial(0, 5, 0) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
make chart based on equation | Charts and Charting in Excel | |||
Formula to find Stop Time from Start Time and Total Minutes | Excel Worksheet Functions | |||
calculating timesheet, time-in/time-out = total hours & minutes, . | Excel Worksheet Functions | |||
How to make one column be the result of an equation between two | New Users to Excel | |||
Using military time but with 100 minutes not 60 minutes | Excel Discussion (Misc queries) |