ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Time calculation (https://www.excelbanter.com/excel-worksheet-functions/61628-time-calculation.html)

rkemper

Time calculation
 
I'm trying to write a logic formula where I am comparing a variable time to a
fixed time. If the variable time is greater than the fixed I assign a value
"1", if it is less than I assign the value "0". The problem I'm facing is
the fixed time is 12:00 am, so the variable is always considered greater.

The formula I'm trying to use is: =IF(A1A2,1,0) where A1 is the
variable time.

How can I correct this so that 11:50 pm is LESS than 12:00am and 1:00am
is GREATER than 12:00am?

--
Thanks!

RKEMPER

Niek Otten

Time calculation
 
And where is the split? 11:49? 12:00PM?
Why not take 12:00PM as fixed time?
You can also include a date; that makes it a lot more logical.
Now you're trying Excel to tell that 1 2. Some time, someway, Excel will
strike back.

--
Kind regards,

Niek Otten

"rkemper" wrote in message
...
I'm trying to write a logic formula where I am comparing a variable time
to a
fixed time. If the variable time is greater than the fixed I assign a
value
"1", if it is less than I assign the value "0". The problem I'm facing
is
the fixed time is 12:00 am, so the variable is always considered greater.

The formula I'm trying to use is: =IF(A1A2,1,0) where A1 is the
variable time.

How can I correct this so that 11:50 pm is LESS than 12:00am and 1:00am
is GREATER than 12:00am?

--
Thanks!

RKEMPER





All times are GMT +1. The time now is 01:16 AM.

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