3885 Views
6 Replies
Latest reply:
Nov 9, 2010 10:01 PM by
Barry

LarryPGH Nov 9, 2010 11:28 AM
Re: How do I do multiple ifthen functions in response to FullastarbucksTwo thoughts... first, your function leaves one possibility open  what value should B be set to, if A = 100?
That being said, here's how to write the function:
Let's assume that A is in call A3 and B is cell B3. Then, in cell B3, the function would be:
=if(a3>100, a3*.75, if(a3<100, a325))
Note that the "else" part of the nested if statement is blank. Try entering 100 in A3, and see what you get... ;^)
Cheers,
Larry 
Fullastarbucks Nov 9, 2010 11:56 AM
Re: How do I do multiple ifthen functions in response to LarryPGHThanks Larry!! That did it! except for your perceived "100" issue, which I solved by making it less than 101. I had figured out all of the easier functions, but this one threw me for a loop, and I couldn't find this in the Apple Formulas Guide.
Thanks again! 
KOENIG Yvan Nov 9, 2010 12:07 PM
Re: How do I do multiple ifthen functions in response to FullastarbucksWhy not :
=IF(A3>100, A3*.75, if(A3<100, A325,herethe_value_forA3=100))
Yvan KOENIG (VALLAURIS, France) mardi 9 novembre 2010 21:07:38 
LarryPGH Nov 9, 2010 1:01 PM
Re: How do I do multiple ifthen functions in response to KOENIG YvanYes, Yvan, of course.
However, that was the point I was gently attempting to draw out; and, the OP solved the problem in a different way  by changing the condition, rather than adding a new function value. 
Badunit Nov 9, 2010 7:02 PM
Re: How do I do multiple ifthen functions in response to FullastarbucksGiven the way you solved the "100" issue, a simpler form of the formula would be "if A>100 then B=A*0.75 else B=A25"
=IF(A>100,A*0.75,A25)
No need for a nested IF statement. 
Barry Nov 9, 2010 10:01 PM
Re: How do I do multiple ifthen functions in response to FullastarbucksFullastarbucks wrote:
Thanks Larry!! That did it! except for your perceived "100" issue, which I solved by making it less than 101.
I don't see the need for a second IF statement.
the syntax on IF is:
IF(ifcondition,iftrue,iffalse)
From your statement above, I gather you want A to be multiplied by 0.75 for values of up to and including 100, and to be reduced by 25 for values greater than 100. Written so that those two conditions are mutually exclusive (ie. no gap or overlap), you need only one condition statement.
=IF(A<=100,A*0.75,A25)
Since in your particular case the result for A=100 is the same whether it's multiplied by 0.75 or has 25 subtracted from it, you would get the same results by putting 100 on the 'false' side of the condition:
=IF(A<100,A*0.75,A25)
<div class="jivequote">I had figured out all of the easier functions, but this one threw me for a loop, and I couldn't find this in the Apple Formulas Guide.
iWork Formulas and Functions User Guide, page 158, in discussion of the IF function:
*Usage Notes*
If the Boolean value of ifexpression is TRUE, the function returns the iftrue
expression; otherwise it returns the iffalse expression.
Both iftrue and iffalse *can contain additional IF functions (nested IF functions).*
Regards,
Barry