Nested Functions

M

Mindie

I have a cell that I am trying to combine 3 different cells into. I need to
do calculations on all of these individual cells before displaying them into
the new cell. I am trying to figure out how to use nested if statements in
order to do this. I am originally an RPG 400 programmer and I have found
that you cannot do If Else statements. Is there another way to do IF ELSE
statements in excel?
 
O

Oliver Ferns via OfficeKB.com

Hi,
the syntax for nested If statements in Excel is as follows..

Single IF Statement...
=If(Cond1,Value if True,Value if False)

Nested IF Statement
=If(Cond1,True,If(Cond2,True,IF(Cond3,True,False)))

where the 2nd IF statement is evaluated when Cond1 is false...
It's worth noting that 2nd IF (or any following) will not be evaluated if
the first condition is TRUE. This is different from VB's IIF statement.

You can use upto 7 nested IF statements in a formula.


Hth,
Oli
 

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