OR
Combine several conditions so that any one of them suffices.
Syntax
OR(logical1, [logical2], ...) | Argument | Required | Description |
|---|---|---|
logical1 | Required | The first condition. |
logical2 | Optional | Further conditions. Any one being true is enough. |
Examples
Every example below was executed against VisiGrid engine 0.31.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=OR(FALSE,TRUE) | TRUE | |
=OR(A1>100,A4>15) | TRUE |
Checking membership
OR with a handful of equality tests is the readable way to ask “is this one of
these”:
=IF(OR(B1="East", B1="West"), "domestic", "other")
Past three or four options it becomes unwieldy, and
COUNTIF(range, B1)>0 against a list of allowed values reads better — the
allowed set becomes data rather than formula text.
Excel compatibility
Matches Excel.