OR checks several conditions and returns TRUE if any of them is true. It returns FALSE only when every condition is false. Like AND, it is mostly used inside IF: =IF(OR(A2="East", A2="West"), "Coastal", "Inland").
The arguments
Each argument is a condition: a comparison such as A2="East" or B2>1000, a cell or formula that returns TRUE or FALSE, or a range of such values. You can give up to 255.
- A number is treated as TRUE unless it is zero.
- Text and empty cells inside a range argument are ignored. If every argument is text or empty, OR returns
#VALUE!. - If any argument is an error, OR returns that error, even if another argument is already true. OR doesn't stop at the first true condition.
OR with a range
=OR(A2:A9="Late") is TRUE if any cell in the range equals "Late". It is a handy "does this appear anywhere" test. In Microsoft 365 and Excel 2021 or later it works as a normal formula. In older versions, enter it as an array formula with Ctrl+Shift+Enter.
A long list of values: use COUNTIF or a lookup
Testing one cell against many values makes OR long: =OR(A2="N", A2="S", A2="E", A2="W"). For more than a handful, a shorter test is =COUNTIF(F2:F9, A2)>0, where F2:F9 holds the accepted values, or =ISNUMBER(MATCH(A2, F2:F9, 0)). Both put the list in cells, where it is easy to maintain.
OR does not work row by row
OR over a column returns a single TRUE or FALSE, not one answer per row. To flag each row, write the test on each row and fill down. To get an array of 1s and 0s, add conditions: =(A2:A9="East")+(A2:A9="West") returns 1 for each row that is East or West.
Combining with AND and NOT
=AND(B2>0, OR(C2="Key", D2>1000)) requires B2 above zero, plus either of two conditions. Without the brackets, the logic changes.=NOT(OR(...)) is true when none of the conditions hold, and is equivalent to AND of the opposites.- XOR is true when an odd number of conditions are true, which suits "one or the other, but not both".
Common uses
- Accept several spellings or codes:
=OR(A2="Yes", A2="Y"). - Flag a row that breaks any rule:
=IF(OR(B2<0, C2="", D2>100), "Check", "OK"). - Combine date tests:
=OR(A2<DATE(2025,1,1), A2>DATE(2025,12,31)) is true when a date falls outside 2025.
Keep each OR short enough to read. Past four or five conditions, move the list into cells.