ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Stumped with an IF function (https://www.excelbanter.com/excel-worksheet-functions/99118-stumped-if-function.html)

Grant Reid

Stumped with an IF function
 
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



Gary''s Student

Stumped with an IF function
 
Time, in natural format, is scaled such that 24 hours = 1. So if the time is
in A1 then:

=IF(A1 < 1,"FALSE","TRUE")
--
Gary's Student


"Grant Reid" wrote:

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




Bob Phillips

Stumped with an IF function
 
=IF(A1=1,True,False)

or just

=A1=1

--
HTH

Bob Phillips

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

"Grant Reid" wrote in message
...
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





Pete_UK

Stumped with an IF function
 
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 Reid wrote:
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



Bernie Deitrick

Stumped with an IF function
 
Grant,

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

=A1=1

HTH,
Bernie
MS Excel MVP


"Grant Reid" wrote in message ...
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





MartinW

Stumped with an IF function
 
Hi Grant,

Try =IF(A1*24=24,"True","False")

HTH
Martin



Grant Reid

Stumped with an IF function
 
Many thanks to all who responded with an explanation.

Kind Regards - Grant




All times are GMT +1. The time now is 07:23 PM.

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