Microsoft Excel logo on a green background

If you’re familiar with using the IF function in Excel, then you might be ready to check out the IFS function. With it, you can test multiple conditions at once, instead of using nested IF statements.

Using IFS, you can test up to 127 conditions in a single Excel formula. Although this number of tests is probably much more than you need, the function is ideal for checking several conditions. The formula then returns the value you specify for the first true condition in the statement.

Use the IFS Function in Excel

The syntax for the function is IFS(test1, if_true1, test2, if_true2,...) where you enter the condition for each test argument and the value to return if the test is true for each true argument.

Let’s look at a few basic examples.

Return Cell Reference Values

Here, the condition looks at the ID number in cell C2. When the formula finds the matching condition, 1 through 5, it returns the corresponding name.


To break down the formula, if the value in cell C2 is 1, return the value in A2, if it’s 2, return the value in A3, if it’s 3, return the value in A4, if it’s 4, return the value in A5, and if it’s 5, return the value in A6.

IFS function with cell reference value results

If you were to use a nested IF statement instead of the IFS function, your formula would look like this:

=IF(C2=1,A2,IF(C2=2,A3,IF(C2=3,A4,IF(C2=4, A5,IF(C2=5,A6)))))

While you obtain the same result using either option, the formula for the IFS function is a little less confusing and doesn’t take as much time to assemble.

Nested IF statement for cell reference value results

RELATED: The Basics of Structuring Formulas in Microsoft Excel

Return Numbers

For another IFS example, we’ll apply bonuses to our salespeople based on their sales totals. Here’s the formula:


To break down this formula, if the total in cell F2 is greater than 100,000, return 1,000, if it’s greater than 75,000, return 750, and if it’s greater than 50,000, return 500.

IFS function with number results

Tip: You can use the fill handle to copy the same IFS formula to adjacent cells.

To compare again, here is what the formula looks like as a nested IF statement instead:


By using the formula for the IFS function, you eliminate the need to repeatedly type IF with an opening parenthesis and remember the correct number of closing parentheses at the end.

Nested IF statement for number results

Return Text Values

In this next example, we have a list of employees who haven’t finished their training. We’ll display a text result based on the percent complete in cell B2. Note that the text values must be in quotes.

=IFS(B2<50,"Less than half",B2=50,"Half",B2>50,"More than half")

To break down this formula, if the value in cell B2 is less than 50, return “Less than half,” if it equals 50, return “Half,” and if it’s more than 50, return “More than half.”

IFS function with text results

For one more comparison, here is what the nested IF statement looks like to obtain the same result:

=IF(B2<50,"Less than half",IF(B2=50,"Half",IF(B2>50,"More than half")))

It can be especially difficult to troubleshoot formulas errors in lengthy statements or those that needs extra care like including quotation marks. This is just one more reason to consider using the IFS function instead of a nested IF formula.

Nested IF statement for text results

As Microsoft explains:

Multiple IF statements require a great deal of thought to build correctly and make sure that their logic can calculate correctly through each condition all the way to the end. If you don’t nest your formula 100% accurately, then it might work 75% of the time, but return unexpected results 25% of the time.

Microsoft goes on to say that nested IF statements can be hard to maintain. This is another consideration for using the IFS function, especially if you’re working on your spreadsheet with others.

When you want to test several conditions for a cell, or even a cell range, consider using the IFS function. For more, learn how to use the other logical functions in Excel like AND, OR, and XOR.

Profile Photo for Sandy Writtenhouse Sandy Writtenhouse
With her B.S. in Information Technology, Sandy worked for many years in the IT industry as a Project Manager, Department Manager, and PMO Lead. She learned how technology can enrich both professional and personal lives by using the right tools. And, she has shared those suggestions and how-tos on many websites over time. With thousands of articles under her belt, Sandy strives to help others use technology to their advantage.
Read Full Bio »