In this article:

How to Use the Google Sheets IF OR Function (The Right Way!)

May 8, 2024

The IF OR function in Google Sheets combines the functionality of the IF and OR functions to create an IF OR statement that is fulfilled even if only one of two or more conditions are met. You can use numeric and string conditions and even combine them together as IF OR conditions to help you identify the entries that you need.

IF OR Google Sheets Syntax

The IF OR formula syntax is

=IF(OR(condition1, condition2, …), value_if_true, value_if_false)

Where

condition1 and condition2 are the conditions to fulfill, but you can set more than two conditions

value_if_true is the value displayed if one of the conditions are met

value_if_false is the value displayed if none of the conditions are met

IF OR Google Sheets  Examples

IF OR with Numeric Conditions

Step 1: Identify the numeric conditions

Raw data to analyze using IF OR function

For this example, we identify the following conditions and values to display:

condition1: 2020 census greater than 500,000

condition2:  2020 population density greater than 5,000

Value_if_true: “very high density”

Value_if_false: “high density”

As condition1 relies on data stored in column C and condition2 relies on data stored in column E, we get the following conditions (assuming row 2):

condition1: C2 > 500000

condition2:  E2 > 5000

Step 2: Input the function =IF(OR(condition1, condition2, …), value_if_true, value_if_false)

For our example, the function is

=if(or(C2>500000,E2<5000),"very high density","high density")

Step 3: Press Enter.

You can extend IF OR down the column, giving you the following output:

Function added as new column

IF OR with String Conditions

Step 1: Identify the string conditions

Raw data to analyze using IF OR function

For this example, we identify three conditions and values to display:

condition1: city is from New York

condition2:  city is from California

condition3: city is from Texas

Value_if_true: “very high population”

Value_if_false: “high population”

As these three conditions rely on data from column B, we get the following conditions:

condition1: B2 = “New York”

condition2: B2 = “California”

condition3: B2 = “Texas”

The strings should be enclosed in double quotes.

Step 2: Input the function =IF(OR(condition1, condition2, …), value_if_true, value_if_false)

The function is

=if(or(B2="New York",B2="California",B2="Texas"),"very high population","high population")

Step 3: Press Enter.

You can extend IF OR down the column, giving you the following output:

Function added as new column

IF OR with both String and Numeric Conditions

Step 1: Identify the conditions

Raw data to analyze using IF OR function

For this example, we identify the following conditions and values to display:

condition1: city is from California

condition2:  population is more than 200,000

Value_if_true: “Major city or from CA"

Value_if_false: "Not major city or not from CA”

As condition1 relies on data stored in column B and condition2 relies on data stored in column C, we get the following conditions (assuming row 2):

condition1: B2 = “California”

condition1: C2 > 200000

The strings should be enclosed in double quotes.

Step 2: Input the function =IF(OR(condition1, condition2, …), value_if_true, value_if_false)

The function is

=if(or(B2="California",C2>200000),"Major city or from CA","Not major city or not from CA")

Step 3: Press Enter.

You can extend IF OR down the column, giving you the following output:

Function added as new column

FAQs

How many conditions should I use?

There is ideally no limit in the number of conditions you can add, but the limits come from the conditional logic you want to implement. This puts the limit to 2-3 conditions.

Can whole conditions be stored in another cell?

No. However, you can reference other cells when defining conditions.

Can I see the sample sheet?

Of course, click here.

Related IF Functions 

IF: Allows you to check for specific conditions across a dataset

SUMIF: Use to sum numbers if they meet a certain condition..

SUMIFS: Sums data from cells that meet multiple criteria

COUNTIF: count data if it fulfils certain criteria

COUNTIFS: Count data that fulfils two or more criteria.

COUNT IF Not Null: Count cells if they contain data

IFS: IFS is a more elegant way to evaluate data against multiple criteria. 

IFERROR: Allows you to output values when an Error in a formula occurs

IF THEN: Allows you tor write statements that use IF X Then Y Logic

IF AND: Combines the functionality of the IF and AND functions



IF Else: Set conditions that give an output depending on whether a given condition is fulfilled or not


Multiple IF Statements: How to chain multiple statements together.

IF Contains: Returns cells that contain a particular text. 

AVERAGEIF: Calculate an average for numbers within a data range if they meet the provided criteria. 

Use our vacation tracker software to easily set up custom reminders from your spreadsheet in just a few clicks. 

If you want to learn how to build an email list in Google Sheets, we also suggest checking out our detailed guide. 

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->