View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
R R is offline
external usenet poster
 
Posts: 6
Default 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