ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   complex "if" statement (https://www.excelbanter.com/excel-programming/331745-complex-if-statement.html)

Patience

complex "if" statement
 
Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,

Rob

complex "if" statement
 
you can use another if statement as one of your arguments in your if statement

eg

=if( [logicaltest1] , "test 1 true" , if ( [logicaltest2] , "test 2 true" ,
"neither true" ) )
In your case:
=if(A1=100,100,if(A1="",0,50))

"Patience" wrote:

Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,


CR[_4_]

complex "if" statement
 
Type this into Cell B1:

=IF(A1=0, 0, IF(A1<100, 50, IF(A1=100, 100, 0)))


Ron Rosenfeld

complex "if" statement
 
On Tue, 14 Jun 2005 05:49:01 -0700, "Patience"
wrote:

Is there any way to write a formula that will examine the cell contents, and
return one of three different values?
I want the formula to look at column A, and if column A value is less than
100, return "50", if it's 100 or more, to return "100", and if it's null or
0, to return "0."
I'm using Office 2003
Thanks,


=IF(A1=0,0,IF(A1<100,50,100))


--ron


All times are GMT +1. The time now is 12:02 AM.

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