In Google Sheets, if you need to evaluate multiple conditions within a single IF statement, you typically combine the IF function with either the AND or OR functions.
Syntax: =IF(AND(condition1, condition2, ...), value_if_true, value_if_false)
This formula checks if all specified conditions are true. The AND function returns TRUE if every condition inside it is true. If so, the IF function then returns value_if_true. If any condition is false, the IF function returns value_if_false.
Syntax: =IF(OR(condition1, condition2, ...), value_if_true, value_if_false)
This formula checks if any one of the specified conditions is true. The OR function returns TRUE if at least one of the conditions inside it is true. If so, the IF function returns value_if_true. If all conditions are false, the IF function returns value_if_false.
Follow the steps below to use the IF function combined with AND to evaluate multiple conditions simultaneously. We'll apply this to a dataset of student scores in Math and Science to determine if they pass based on achieving minimum scores in both subjects.
Choose the conditions you need to evaluate. For instance, you're checking if a student has scored at least 70 in Math (A2) and 80 in Science (B2).
Select the result cell and type '=IF(' to initiate the formula. This is where your logical test begins.
Inside the IF function, type 'AND(' to start combining your conditions. The AND function will check if all conditions are met.
Type your specific conditions in the AND function. For this example, put 'A2 >= 70' and 'B2 >= 80', separated by a comma.
After the conditions, close the AND function with ')', and add outcomes for both true ("Pass") and false ("Fail") scenarios.
End the formula with a closing parenthesis ')'. The full formula for our example becomes '=IF(AND(A2 >= 70, B2 >= 80), "Pass", "Fail")'.
Follow the steps below to use the IF function in conjunction with OR to check if any one of multiple conditions is met. We'll use a dataset containing students' attendance percentages and English scores to determine their qualification based on either high attendance or excellent scores.
Decide on conditions where meeting any one of them is sufficient. Let's say, a student must be present more than 80% of the time (C2) or score above 90 in English (D2).
In the desired result cell, type '=IF('. This starts your logical test using the IF function.
After IF(, insert 'OR('. The OR function will evaluate if any of your conditions are true.
In the OR function, input the conditions. For our case, it's 'C2 > 80%' and 'D2 > 90', each separated by a comma.
Close the OR function with ')', and then add what happens if conditions are true ("Qualified") or false ("Not Qualified").
Conclude with a closing parenthesis ')'. The entire formula for this example is '=IF(OR(C2 > 80%, D2 > 90), "Qualified", "Not Qualified")'.
We hope that you now have a better understanding of how to use Google Sheets IF Multiple conditions.
If you enjoyed this article, you might also like our article on how to use the IFS formula in Google Sheets or our article on how to send bulk emails from Google Sheets.
If you want to get a copy of our Google Sheets contact list, we also suggest checking out our detailed guide.