The IF function in Excel is an efficient way to make decisions based on multiple conditions. You can use it to assign categories, labels, or values depending on whether certain conditions are met. While a simple IF function checks just one condition, you can nest multiple IFs or use the IFS function, available in newer Excel versions, to handle more complex logic such as three conditions.
In this article, you’ll learn how to use the IF function with exactly three conditions using nested IF statements, the IFS function, AND/OR logic, and even math-based evaluations. Each method comes with real-world examples based on a sample student dataset.
Steps to use IF function with 3 conditions in Excel:
➤ First, select cell D2 where you want the grade result to appear.
➤ Next, enter this formula to set conditions:
=IF(B2>=85, “Distinction”, IF(B2>=70, “Credit”, IF(B2>=50, “Pass”, “Fail”)))
➤ Press Enter to apply the formula for the first student.
➤ Finally, drag the fill handle down from D2 to fill the formula for the entire column in the dataset.
Set Up Three Conditions Using Nested IF Statements
This method uses traditional nested IF logic to assign grades based on a student’s score. It is the most direct way to evaluate three conditions. The logic is as follows: if the score is greater than or equal to 85, the grade is “Distinction.” If the score is at least 70 but less than 85, the grade is “Credit.” Scores between 50 and 69 receive a “Pass,” and anything below 50 results in a “Fail” by default.
We will use the following dataset for all examples in this article. It includes student names, scores, and the number of days left before the submission deadline. The table shows seven students with their scores ranging from 45 to 92, and deadlines varying from 2 to 15 days. We will write our formulas in Column D based on the logic needed.
Steps:
➤ First, select cell D2 where you want the grade result to appear.
➤ Next, enter this formula:
=IF(B2>=85, “Distinction”, IF(B2>=70, “Credit”, IF(B2>=50, “Pass”, “Fail”)))
To customize formula, change cell references and other values.
➤ Press Enter to apply the formula for the first student.
➤ Finally, drag the fill handle down from D2 to fill the formula for all students in the dataset.
This formula categorizes each student’s score using three grading bands. For example, Anna with a score of 92 receives “Distinction,” while Edward with 45 gets “Fail.”
Use IFS Function to Apply Three Conditions (Excel 2016 and Later)
The IFS function replaces nested IFs with a cleaner and more readable approach. It allows testing multiple conditions in one go. We will use the same grading logic as in the first method to assign grades based on the score.
Steps:
➤ Click cell D2 to begin.
➤ Type the following formula:
=IFS(B2>=85, “Distinction”, B2>=70, “Credit”, B2>=50, “Pass”, TRUE, “Fail”)
➤ Hit Enter to see the result for the first student.
➤ Drag the formula down to apply it to all rows.
This formula gives the same results as the previous method but is easier to read and maintain. The TRUE condition at the end acts as a default value when none of the previous conditions are met.
Combine IF with AND Functions to Evaluate 3 Conditions Together
This method evaluates all three conditions simultaneously using the AND function. For example, we will flag students as “High Priority” if they meet all of the following: the score is at least 70, the deadline is within 5 days, and the name is not empty.
Steps:
➤ Select cell D2 where you want the priority label.
➤ Enter this formula:
=IF(AND(B2>=70, C2<=5, A2<>””), “High Priority”, “Normal”)
➤ Press Enter to confirm.
➤ Use the fill handle to drag the formula down the column for all students.
This formula marks Charles and Grace as “High Priority” because they meet all three conditions. The rest are labeled “Normal“.
Use IF with OR and AND Functions for Step-by-Step Evaluation
You can combine AND and OR functions to create more complex logic. In this method, students will be classified as “Critical” if they meet any of these conditions: they have less than 5 days left and a score under 70, or they score below 60 regardless of the deadline, or they have a score above 90.
Steps:
➤ Click on cell D2.
➤ Insert this formula:
=IF(OR(AND(C2<5, B2<70), B2<60, B2>90), “Critical”, “OK”)
➤ Press Enter to calculate the first result.
➤ Drag down the fill handle to apply the logic to the rest of the dataset.
This formula flags Anna and Edward as “Critical” due to their extreme scores, and Grace also as “Critical” because of her close deadline and relatively low score.
Use IF with SUM or AVERAGE Functions for Aggregate Checks
This method bases conditions on the sum of the score and the deadline days left. If the total is greater than 100, the result is “Excellent.” If it is over 85, it is “Good.” If greater than 60, the label is “Average,” otherwise, “Needs Work.”
Steps:
➤ Select cell D2 to begin.
➤ Enter this formula:
=IF(B2+C2>100, “Excellent”, IF(B2+C2>85, “Good”, IF(B2+C2>60, “Average”, “Needs Work”)))
➤ Press Enter to see the result for the first student.
➤ Drag the fill handle down to apply the formula to all rows.
This provides a combined evaluation based on both performance and urgency. For instance, Anna and Brian receive “Excellent” ratings due to their combined values exceeding 100.
Frequently Asked Questions
How do I write an IF formula with three conditions in Excel?
You can nest IF statements like =IF(cond1, val1, IF(cond2, val2, IF(cond3, val3, default))) to handle three conditions. This allows Excel to check each condition in order and return the appropriate result.
Can I simplify multiple IFs in Excel?
Yes. Excel 2016+ supports the IFS() function, which avoids deep nesting and improves readability. It allows testing multiple conditions in a single formula, making your logic easier to manage and debug.
What’s better: IF or IFS for 3 conditions?
IFS function is more readable and concise, especially when you have three or more conditions. However, IF function is more flexible in older Excel versions and when combining with logic like AND, OR, or error handlers.
Can IF use logical operators like AND or OR?
Absolutely. You can wrap logical tests within IF function, such as =IF(AND(A2>70, B2<10, C2=TRUE), “Pass”, “Fail”), to evaluate whether multiple criteria are all (AND) or partially (OR) true before returning a value.
Can I use numbers and logic together in IF formulas?
Yes. You can incorporate arithmetic functions like SUM, AVERAGE, or logical tests such as >, <, or = in IF formulas. For example: =IF(SUM(A2:C2)>200,”OK”,”Not OK”) checks combined cell values before decision-making.
Wrapping Up
In this tutorial, you learned how to use the IF function in Excel to evaluate three different conditions across multiple approaches, including nested IFs, the IFS function, AND/OR logic, and score-based aggregate evaluations. Applying these methods to real-world data such as student scores and deadlines enables you to assign clear, meaningful labels and automate decision-making processes. Feel free to download the practice file and share your feedback.