IF Function with 3 Conditions

Bottom Line: Master the IF function with three conditions to make your Excel data analysis more powerful.

Skill Level: Intermediate

Download the Excel File

You can download the Excel file that has the examples from this post here:

The IF Function with 3 Conditions

If Fucntion with three or more conditions.

The IF function in Excel allows you to test a condition and return one value if the condition is TRUE and another if it's FALSE. (See this tutorial for a detailed explanation of how to write an IF function). But what if you need to check multiple conditions?

In this post, we’ll walk through how to use the IF function with three conditions to help you handle more complex logic.

Let’s break down how you can use nested IF functions or the IFS function to achieve this.

1. Using Nested IF Functions

You can use nested IF functions to test multiple conditions in Excel. With this approach, you combine several IF statements to evaluate three conditions, one after the other.

Steps:

  1. Start by typing your IF function in the desired cell.
  2. The basic syntax is:
    =IF(condition1, result1, IF(condition2, result2, IF(condition3, result3, result_if_all_false)))
  3. Excel will evaluate each condition in sequence until it finds a TRUE result or returns the final FALSE result.

In the example below, the nested functions test multiple conditions to determine how to rate a test score.

  • If the test score is greater than 90, return “Excellent.”
  • If the test score is greater than 80, return “Good.”
  • If the test score is greater than 70, return “Average.”
  • If none of the above conditions are met, return “Poor.”

The formula reads =IF(A2>60, “Pass”, IF(B2>60, “Pass”, IF(C2>60, “Pass”, “Fail”)))

IF Function example

2. Using the IFS Function

In Excel 2016 and later versions, the IFS function simplifies checking multiple conditions. Instead of nesting IF statements, you can use IFS to test all conditions in one function.

Steps:

  1. Select the cell where you want the result.
  2. The basic syntax for the IFS function is:
    =IFS(condition1, result1, condition2, result2, condition3, result3)
  3. Excel will evaluate each condition in order and return the result of the first TRUE condition.

Below, you find the same test score example as above, but written using the IFS function.

=IFS(A2>90, “Excellent”, B2>80, “Good”, C2>70, “Average”, TRUE, “Poor”)

IFS checks multiple conditions in order of priority:

IFS function explained

Bonus Tip: Combining with AND/OR

You can further enhance your IF function by combining it with AND or OR to test if multiple conditions are met at the same time or if any condition is true.

  • AND: All conditions must be TRUE.
  • OR: Only one condition needs to be TRUE.

For example, you can use:
=IF(AND(condition1, condition2, condition3), result_if_true, result_if_false)

In the example below, the formula checks if all three test scores (columns A, B, and C) are greater than 60 using the AND function. If they are, it returns “Pass”; if not, it returns “Fail.”

=IF(AND(A2>60, B2>60, C2>60), “Pass”, “Fail”)

Combine IF with AND/OR to test if multiple conditions are true or if any condition is true.

Conclusion

By using nested IF, IFS, or combining with AND/OR, you can handle more complex logic in Excel. Mastering these functions will help you make smarter decisions based on your data!

Got questions or tips of your own on this topic? Leave a comment below!

Related Posts:

1 comment

Your email address will not be published. Required fields are marked *

  • I want to check if all 3 conditons are 1,2,3 or 4.

    If A,B,C is 1 then it shows 1, if ABC, is 2, then it shows 2, if ABC is 3, it shows 3 and if ABC is 4, it shows 4.

    But I cant seem to get it working?

Generic filters
Exact matches only

Excel Shortcuts List

keyboard shortcuts list banner

Learn over 270 Excel keyboard & mouse shortcuts for Windows & Mac.

Excel Shortcuts List

Join Our Weekly Newsletter

The Excel Pro Tips Newsletter is packed with tips & techniques to help you master Excel.

Join Our Free Newsletter