Skip to content

Excel function · Logical

Excel OR function

OR returns TRUE when at least one of its conditions is true and FALSE when all of them are false. Use it for "this or that" checks such as a date falling on a weekend or an order needing review.

In Turkish Excel: YADA

What it does

OR takes as many conditions as you like: =OR(C2>10000,B2="New"). If any of them is TRUE, the result is TRUE; only when all are FALSE does it return FALSE. The result usually goes into the test of IF.

It is also used to compare one cell with several values: =OR(B2="Returned",B2="Cancelled"). The formula gets long as the values pile up; at that point it is easier to list the values and test with ISNUMBER(MATCH(B2,$F$2:$F$6,0)).

If every condition must hold, use AND; to reverse a condition, use NOT. If you want exactly one of the conditions to be true, there is XOR.

Syntax

English Excel=OR(logical1, [logical2], ...)
Turkish Excel=YADA(mantıksal1; [mantıksal2]; ...)

Arguments in square brackets are optional. English Excel separates arguments with commas (,) and uses a dot for decimals; Turkish Excel uses semicolons (;) and a decimal comma. Excel shows function names in its own language when it opens the file.

Arguments

ArgumentRequiredDescription
logical1RequiredThe first condition, one that results in TRUE or FALSE, e.g. C2>10000.
logical2OptionalThe next condition to test; up to 255 conditions are allowed.

Examples

1Does an overtime date fall on a weekend?

With return_type 2, WEEKDAY gives 6 for Saturday and 7 for Sunday. OR returns TRUE if either of the two conditions holds.

C2fx=OR(WEEKDAY(A2,2)=6,WEEKDAY(A2,2)=7)
Does an overtime date fall on a weekend?: example table
ABC
1Overtime DateHoursWeekend?
26-Nov-20263FALSE
37-Nov-20265TRUE
48-Nov-20264TRUE
59-Nov-20262FALSE
  • C2 (filled down to C5)=OR(WEEKDAY(A2,2)=6,WEEKDAY(A2,2)=7)

Saturday 7 November and Sunday 8 November show TRUE; Friday 6 November shows FALSE. You can use this column to total weekend overtime separately.

We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.

2Send orders for approval when either condition holds

An order goes for approval if the amount is over 10,000 or the customer is new; the rest are approved automatically. OR goes into the test of IF.

D2fx=IF(OR(C2>10000,B2="New"),"Send for approval","Auto-approve")
Send orders for approval when either condition holds: example table
ABCD
1OrderCustomer TypeAmountApproval
2SO-801Existing4,200.00Auto-approve
3SO-802New1,850.00Send for approval
4SO-803Existing12,750.00Send for approval
5SO-804New15,400.00Send for approval
6SO-805Existing9,990.00Auto-approve
  • D2 (filled down to D6)=IF(OR(C2>10000,B2="New"),"Send for approval","Auto-approve")

SO-802 is a small order but comes from a new customer: Send for approval. SO-805 meets neither condition and gets Auto-approve. SO-804 meets both, and the result is the same: Send for approval.

We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.

Common errors and fixes

#VALUE!

Cause: The test was written incompletely, like OR(B2="Returned","Cancelled"); the second argument is plain text, not a comparison.

Fix: Write each value as its own comparison: OR(B2="Returned",B2="Cancelled").

Unexpected TRUE

Cause: An empty cell was compared with a number; B2<100 is true for an empty cell because it counts as 0.

Fix: Test for empty cells as well: AND(B2<>"",B2<100).

Good to know

  • OR also reduces a whole range to one result. For an "or" test across many rows, add the conditions: (B2:B9="Returned")+(B2:B9="Cancelled").
  • There is a shorter weekend test as well: =WEEKDAY(A2,2)>5.

In Nexell

Get Nexell to do it from a sentence

Type this in Nexell

In the order list, write "Send for approval" next to orders over 10,000 or from new customers

Convert to table

Bring your order list into the tool and type this. Nexell adds the conditional column with real Excel formulas and the preview shows which orders were flagged; in the downloaded file, the flag changes when the amount does.

Nexell uses AI to understand the request and builds the result with real Excel formulas; the formula may differ from the example on this page. You see a preview first and nothing changes until you press Apply; formulas stay live in the downloaded .xlsx file.

Free account · no card needed · 30 credits a month

Frequently asked questions

What is the difference between OR and AND?

AND returns TRUE only if every condition is true; for OR, one true condition is enough. If an order must be both over 10,000 and from a new customer, use AND; if either is enough, use OR.

Related functions

All logical functions →

Stop memorising formulas. Describe them.

Bring your table into the tool and say what you need; Nexell builds the formula and shows it in a preview.

Try it free