ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compare time (https://www.excelbanter.com/excel-discussion-misc-queries/49522-compare-time.html)

Eddie Munster

compare time
 
I would like to compare a calculated time in my work sheet vs. the actual
system time. For example, if the caculated time is than or = to the system
time I want excel to tell me to "CALL", if not then "REST"...any help would
be appreciated.

Thanks,
DE

Gary''s Student

Put your calculated time in a cell (say A1) In B1 put =NOW()
in C1 enter =IF(A1=B1,"CALL","REST)
--
Gary''s Student


"Eddie Munster" wrote:

I would like to compare a calculated time in my work sheet vs. the actual
system time. For example, if the caculated time is than or = to the system
time I want excel to tell me to "CALL", if not then "REST"...any help would
be appreciated.

Thanks,
DE


JE McGimpsey

One way:

If your calculated value is in A1, then

=IF(A1=MOD(NOW(),1),"CALL","REST")

In article ,
"Eddie Munster" <Eddie wrote:

I would like to compare a calculated time in my work sheet vs. the actual
system time. For example, if the caculated time is than or = to the system
time I want excel to tell me to "CALL", if not then "REST"...any help would
be appreciated.


JE McGimpsey

Student - did you test this?

Your formula should never result in "CALL", since NOW() returns a date
and time, not just a time.

If B1 contains =MOD(NOW(), 1), then the formula would work.

In article ,
Gary''s Student wrote:

Put your calculated time in a cell (say A1) In B1 put =NOW()
in C1 enter =IF(A1=B1,"CALL","REST)


Gary''s Student

You are right JE. My calculated time was actually a date with time formatting
--
Gary''s Student


"JE McGimpsey" wrote:

One way:

If your calculated value is in A1, then

=IF(A1=MOD(NOW(),1),"CALL","REST")

In article ,
"Eddie Munster" <Eddie wrote:

I would like to compare a calculated time in my work sheet vs. the actual
system time. For example, if the caculated time is than or = to the system
time I want excel to tell me to "CALL", if not then "REST"...any help would
be appreciated.



Eddie Munster

Thank you both...works like a charm!!!

"Gary''s Student" wrote:

You are right JE. My calculated time was actually a date with time formatting
--
Gary''s Student


"JE McGimpsey" wrote:

One way:

If your calculated value is in A1, then

=IF(A1=MOD(NOW(),1),"CALL","REST")

In article ,
"Eddie Munster" <Eddie wrote:

I would like to compare a calculated time in my work sheet vs. the actual
system time. For example, if the caculated time is than or = to the system
time I want excel to tell me to "CALL", if not then "REST"...any help would
be appreciated.




All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com