Stumped with an IF function

  • Thread starter Thread starter Grant Reid
  • Start date Start date
G

Grant Reid

Hi

I have entered a time value 27:00 in cell A1, with the following custom format [h]:mm:ss. I want to construct a test that will
return "True" if the A1 is more than or equal to 24 hours, and "False" if less than 24 hours. I know this will entail the use of the
"IF" function, which I've tried but cannot get it to compute the correct response. Hope somebody can help with this.

Kind Regards - Grant
 
Time, in natural format, is scaled such that 24 hours = 1. So if the time is
in A1 then:

=IF(A1 < 1,"FALSE","TRUE")
 
=IF(A1>=1,True,False)

or just

=A1>=1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

Grant Reid said:
Hi

I have entered a time value 27:00 in cell A1, with the following custom
format [h]:mm:ss. I want to construct a test that will
return "True" if the A1 is more than or equal to 24 hours, and "False" if
less than 24 hours. I know this will entail the use of the
"IF" function, which I've tried but cannot get it to compute the correct
response. Hope somebody can help with this.
 
Grant,

times are store internally in Excel as fractions of a 24-hour day. Thus
24:00:00 is exactly equal to 1, and you can build this into your test
as follows:

=IF(A1>=1,TRUE,FALSE)

Hope this helps.

Pete
 
Grant,

No need for an IF function if all you want is TRUE or FALSE:

=A1>=1

HTH,
Bernie
MS Excel MVP
 
Many thanks to all who responded with an explanation.

Kind Regards - Grant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top