Creating an If/Then calculation


Posted by DebbieWalker on June 18, 2001 6:23 AM

Ive always heard there are no stupid questions so here goes.
My Excel knowledge is limited but i need to complete a research project and
my time with playing with this program is running out. Heres my problem

I need to enter a simple If/then statement but if I use the IF(logical) function
it only allows me to go one step and i need three steps.
Example
If "variable1" is > ("variable2" -.05) then "variable5" *.75, if not then
if "variable1" is > ("Variable3" -.05) then "variable5" *.50, if not then
if "variable1" is < "variable4 then "variable5 *.25

Is there a quick reference book out there for Excel? Im having trouble following the
help info.
Thank you for your assistance,
Debbie Walker

Posted by Aladin Akyurek on June 18, 2001 6:47 AM

Debbie

Try:

=IF(Var1>Var2-0.05,Var5*0.75,IF(Var1>Var3-0.05,Var5*0.5,IF(Var1 < Var4,Var5*0.25,"")))

Substitute for Var1, Var2, etc the actual cell references or give these names to cells of interest via the Name Box.

If you don't mind a result of 0 instead of a blank cell that the above IF-formula would give in case all IF-conditions fail, use:

=Var5*IF(Var1>Var2-0.05,0.75,IF(Var1>Var3-0.05,0.5,IF(Var1<Var4,0.25,0)))

Aladin

===============



Posted by Julie on June 18, 2001 7:40 AM

Use the ElseIf statement instead...