Spreadsheet formulas explained, side by side

OR Function in Excel, Google Sheets, Airtable & Notion

OR returns TRUE if at least one of its conditions is TRUE, and FALSE only when every condition is FALSE.

Syntax in each app

AppSupportSyntax & notes
Excel✔ Built inOR(logical1, [logical2], ...)
Google Sheets✔ Built inOR(logical_expression1, [logical_expression2, ...])
Airtable✔ Built inOR(expression1, [expression2, ...])
Returns 1 or 0.
Notion✔ Built inor(condition1, condition2)
Also written with the keyword: a or b.
Try OR with your own values
Result (as Excel & Google Sheets return it)
TRUE
Your formula, ready to paste
Excel=OR(104 < 35, 104 > 100) open excel.new ↗
Google Sheets=OR(104 < 35, 104 > 100) open sheets.new ↗
AirtableOR(104 < 35, 104 > 100)
Notionor(104 < 35, 104 > 100)

TRUE means the reading is outside the allowed range: below the minimum or above the maximum.

Arguments

ArgumentWhat it means
logical1The first condition.
[logical2], ... optionalMore conditions. Excel accepts up to 255.

Examples

FormulaResultWhyCopy
=OR(104<35, 104>100)TRUEThe second condition is TRUE.
=OR(FALSE, FALSE)FALSEOnly all-FALSE gives FALSE.
=IF(OR(A2="CA", A2="NY"), "Coastal", "Other")"Coastal" or "Other"Match one of several values.

Examples use Excel / Google Sheets syntax unless noted.

How OR works

OR is the "any of these" test: flag a reading that is too low or too high, treat a customer as priority if they are VIP or their order is over $1,000, or match a cell against a short list of values. Combine it with IF to return something more useful than TRUE or FALSE.

OR is the mirror image of AND: "outside the range" with OR is the same as NOT "inside the range" with AND. For matching one cell against many values, =OR(A2="CA", A2="NY", A2="WA") works but grows long; in Excel and Google Sheets =OR(A2={"CA","NY","WA"}) or COUNTIF against a list is shorter.

Airtable and Notion work the same way. Notion also accepts the keyword form, prop("Status") == "Late" or prop("Amount") > 1000. Watch out when mixing and and or keywords: use brackets to make the grouping explicit.

Frequently Asked Questions

How do I check if a cell equals one of several values?
Use =OR(A2="CA", A2="NY"). For a long list, =COUNTIF(list, A2)>0 is easier to maintain.

Part of the Logical functions. Results in the tester follow Excel and Google Sheets behaviour; always double-check important work in your own file.