View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
rkemper
 
Posts: n/a
Default Logic formula using Time

I am trying to write a formula that compares a variable time to a fixed time.
If the variable is greater than the fixed, I assign it the value "1" and if
it is less than, I assign in the value "0".

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

The problem I have is that the fixed time is 12:00 AM, so Excel is reading
all variable times as GREATER than and assigning a "1".

How can I write the formula so that 11:50 PM (the previous calendar day)
will read as LESS THAN the fixed 12:00 AM (the following calendar day)?



--
Thanks!

RKEMPER