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
| App | Support | Syntax & notes |
|---|---|---|
| Excel | ✔ Built in | OR(logical1, [logical2], ...) |
| Google Sheets | ✔ Built in | OR(logical_expression1, [logical_expression2, ...]) |
| Airtable | ✔ Built in | OR(expression1, [expression2, ...])Returns 1 or 0. |
| Notion | ✔ Built in | or(condition1, condition2)Also written with the keyword: a or b. |
| Excel | =OR(104 < 35, 104 > 100) | open excel.new ↗ |
|---|---|---|
| Google Sheets | =OR(104 < 35, 104 > 100) | open sheets.new ↗ |
| Airtable | OR(104 < 35, 104 > 100) | |
| Notion | or(104 < 35, 104 > 100) |
Excel & Sheets use cell ranges. Paste this sample data into cell A1 of a blank sheet, then paste the formula into any empty cell.
TRUE means the reading is outside the allowed range: below the minimum or above the maximum.
Arguments
| Argument | What it means |
|---|---|
logical1 | The first condition. |
[logical2], ... optional | More conditions. Excel accepts up to 255. |
Examples
| Formula | Result | Why | Copy |
|---|---|---|---|
=OR(104<35, 104>100) | TRUE | The second condition is TRUE. | |
=OR(FALSE, FALSE) | FALSE | Only 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)>0is easier to maintain.