Table of Contents
The IF function in Excel allows users to perform logical tests and specify actions to be taken based on the results of those tests. By using this function with multiple conditions, users can further refine their logical tests and create more complex and precise calculations. This can be accomplished by nesting multiple IF functions within each other, or by using logical operators such as AND, OR, and NOT to combine conditions. This enables users to create custom formulas that can handle a variety of scenarios and make data analysis more efficient and accurate.
Excel: Use IF Function with Multiple Conditions
You can use the following formulas to create an IF function with multiple conditions in Excel:
Method 1: Use IF Function to Test if Multiple Conditions are Met
=IF(AND(B2="Guard",C2>20),"Yes", "No")
For this formula, if cell B2 is equal to “Guard” and cell C2 is greater than 20, then the function returns “Yes.” Otherwise it returns “No.”
Method 2: Use IF Function to Test if One of Several Conditions are Met
=IF(OR(B2="Guard",C2>20),"Yes", "No")
For this formula, if cell B2 is equal to “Guard” or cell C2 is greater than 20, then the function returns “Yes.” Otherwise it returns “No.”
The following examples show how to use each formula in practice with the following dataset in Excel:

Example 1: Use IF Function to Test if Multiple Conditions are Met
We can type the following formula into cell D2 to return “Yes” if the value in the Position column is “Guard” and the value in the Points column is greater than 20:
=IF(AND(B2="Guard",C2>20),"Yes", "No")
We can then click and drag this formula down to each remaining cell in column D:

The formula returns “Yes” for each row where the value in the Position column is “Guard” and the value in the Points column is greater than 20.
If both of these conditions aren’t met in a given row, then the formula returns “No” instead.
Example 2: Use IF Function to Test if One of Several Conditions are Met
=IF(OR(B2="Guard",C2>20),"Yes", "No")
We can then click and drag this formula down to each remaining cell in column D:

The formula returns “Yes” for each row where the value in the Position column is “Guard” or the value in the Points column is greater than 20.
If neither of these conditions are met in a given row, then the formula returns “No” instead.
Note that in both examples, we checked if two conditions were met.
However, you can place as many conditions as you’d like in the AND() or OR() functions depending on how many conditions you’d like to check.
The following tutorials explain how to perform other common tasks in Excel:
Cite this article
stats writer (2024). How can I use the IF function in Excel with multiple conditions?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-multiple-conditions/
stats writer. "How can I use the IF function in Excel with multiple conditions?." PSYCHOLOGICAL SCALES, 25 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-multiple-conditions/.
stats writer. "How can I use the IF function in Excel with multiple conditions?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-multiple-conditions/.
stats writer (2024) 'How can I use the IF function in Excel with multiple conditions?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-multiple-conditions/.
[1] stats writer, "How can I use the IF function in Excel with multiple conditions?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use the IF function in Excel with multiple conditions?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
