ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Nested Functions (https://www.excelbanter.com/setting-up-configuration-excel/13269-nested-functions.html)

Mindie

Nested Functions
 
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?

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

--
Message posted via http://www.officekb.com


All times are GMT +1. The time now is 03:54 AM.

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