Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default 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






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Stumped with an IF function

Hi Grant,

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

HTH
Martin


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Stumped with an IF function

Many thanks to all who responded with an explanation.

Kind Regards - Grant


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"