How do I combine the IF and OR Functions in Google Sheets

The IF and OR functions in Google Sheets can be combined to check multiple conditions in a single formula. This is done by nesting the IF function within the OR function, which allows you to check multiple conditions within a single formula. The OR function will return TRUE if any of the conditions are TRUE, while the IF function will return the value you specify if the condition is TRUE or another value if it is FALSE. By combining these two functions, you can check multiple conditions in a single formula.


You can use the following basic syntax to use the IF and OR functions together in Google Sheets to determine if some cell meets one of multiple criteria:

=IF(OR(A2="String", B2>10), "value1", "value2")

If the value in cell A2 is equal to “String” or if the value in cell B2 is greater than 10, then we return value1, otherwise we return value2.

Note that we can use as many logical comparisons as we’d like within the OR function.

The following examples show how to use this syntax in practice.

Example 1: Combine IF and OR Functions with String Comparisons

Suppose we have a column that contains the names of NBA teams and we’d like to determine if each team is based in Texas:

Note that the only teams that are based in Texas are the Mavs, Rockets, and Spurs.

We can use the following formula with the IF and OR functions to determine if each team is based in Texas:

=IF(OR(A2="Mavs", A2="Rockets", A2="Spurs"), "Yes", "No")

The following screenshot shows how to use this syntax in practice:

If a given team is from Texas, we return a value of “Yes”, otherwise we return “No.”

Example 2: Combine IF and OR Functions with Numeric Comparisons

Suppose we have columns that contain the number of points and assists for various basketball players and we’d like to classify each player as “Good” or “Bad.”

We can use the following formula with the IF and OR functions to determine if each player should be classified as “Good” or Bad”:

=IF(OR(A2>20, B2>10), "Good", "Bad")

The following screenshot shows how to use this syntax in practice:

IF and OR function in Google Sheets

If a given player has more than 20 points or more than 10 assists, we classify them as “Good.”

Otherwise we classify them as “Bad.”

The following tutorials explain how to perform other common operations in Google Sheets:

x