Nested If Statement

J

JulieD

Hi

syntax of a nested IF with an additional IF in both the true & false parts
of the original IF
=IF(test,IF(test,true,false),IF(test,true,false))
e.g.
=IF(A1>50,IF(A1>90,"distinction","pass"),IF(A1<20,"fail","hold"))

if you'ld like more specific assistance, please post back with what you're
testing for and what the different outcomes are

Cheers
JulieD
 
B

BenjieLop

An example:

If A1<10, then B1=1
If A1=10, then B1=5
For all other values of A1, B1=10

For the above example, your nested IF (entered in Cell B1) is

=if(A1<10,1,if(A1=10,5,10))

How many IFs do you need in your formula? Do note that Excel onl
allows 7 IFs to be nested. If you have more than 7 conditions, yo
might need some other formulas to consider.
 
F

Frank Kabel

Hi
do you mean something like
=IF(A1=1,"is one",IF(A1=2,"two","something else"))
 
D

Devanir

You may substitute the value_if_true and/or the
value_if_false with another entire IF (from IF to the last
parenthesis).

Example:

=IF(AK11="OK";9;IF(AK11="US";7;"ERR"))

When AK11 have the string OK, the result will be "9",
otherwise if AK11 have the string US, the result will
be "7". If AK11 is neither OK nor US, the result will be
ERR.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top