How to use multiple IF conditions in MS EXCEL
A typical IF condition is as below
=if(logical_test, Value_If_True, Value_If_False)
= IF(A1=1,”label for True condition”,”Label for False Condition”)
eg .IF(A1=1,”YES”,”NO”) – this will show “YES” if the contents of cell A1 is 1 otherwise it will show NO in the cell where you put this formula.
Now look at the more complicated scenario as shown below.
Consider the following conditions, if the option is 1, 2 or 3 then you would like to display “YES” and if it is not in 1,2, or 3 then you would want to display a “NO”
You can achieve it by using nested or multiple IF conditions.
you can use a formula like the following
Basically you are replacing the “No” or the FALSE portion of the formula and extending it by giving another IF condition.
So if B2 =1 then show YES, if B2 <> 1 then try to evaluate if B2 =2 , if B2 is 2 then show a YES, but if B2 is not 2 then try to evaluate if B2 =3 , if B2 is 3 then show YES otherwise show NO.
You can keep on nesting multiple IFs by replacing the “FALSE” portion of the IF command and then putting another IF condition instead.