There are only these two sizes in the data.

Notice we are only testing for “S” we don’t need to test for “L”.

But how do you implement the idea of “If elseif” in Excel?

Nested IF function example

In that case, we can extend the formula with another IF statement.

We do this by replacing the existing FALSE result with a second IF function.

In the example below, we’ve extended the formula to handle a medium size.

Nested IF function example

Other options

It is possible to nest many IF functions together in a single formula.

However, the longer a formula like this gets, the harder it is to read and maintain.

More than one condition can be tested by nesting IF functions.

Nested IF function example

Use the IFS function to evaluate multiple conditions without multiple nested IF statements.

Nested IF function example

Nested IF function example

Excel formula: If this AND that

Excel formula: If cell is this OR that

Excel formula: If NOT this or that

Excel formula: If cell contains

Excel formula: Nested IF function example

Excel IF function

Excel IFS function

Excel VLOOKUP function

Article image

Article image