In Excel: use =OR(A2>100, B2="urgent") when ANY condition being true is enough, and =AND(A2>100, B2="urgent") when ALL of them must be true — both usually sit inside an IF.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
logical1 | required | The first condition to test. Anything that evaluates to TRUE or FALSE. |
logical2 … | optional | Further conditions, up to 255. OR is TRUE when any one is TRUE; AND is TRUE only when all are. |
Related functions
IF(SUMIFS(C2:C100, A2:A100, "West") > 1000, "On target", "Below")Tests a condition: returns the 2nd argument if true, the 3rd if false.SUMIFS(C2:C100, A2:A100, "West") > 1000The left side is greater than the right side.SUMIFS(C2:C100, A2:A100, "West")Adds the cells that match every listed condition.C2:C100A reference to cells in your sheet.A2:A100A reference to cells in your sheet."West"A fixed value typed directly into the formula.1000A fixed value typed directly into the formula."On target"A fixed value typed directly into the formula."Below"A fixed value typed directly into the formula.Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
OR and AND take the same arguments and differ only in the rule they apply. OR returns TRUE when at least one condition holds; AND returns TRUE only when every one does. On their own they return the bare words TRUE or FALSE, which is rarely the point — they are almost always the first argument of an IF, which turns that verdict into a useful result: =IF(AND(…), "Approved", "Review"). Both accept up to 255 conditions. Two extra facts matter in practice. NOT(x) flips a result, so =IF(NOT(OR(…)), …) reads as "if none of these". And multiplying conditions does the same job inside array formulas, where (A2:A100="North")*(B2:B100>500) behaves as AND and adding them behaves as OR. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “use the or function in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
An order is flagged when it is either large or marked urgent: =IF(OR(C2>1000, D2="urgent"), "Flag", "") — a €1,200 standard order and a €40 urgent order both get flagged. Approval instead needs both conditions: =IF(AND(C2>1000, D2="urgent"), "Approve", "Review") flags only the order that is large AND urgent. Nesting them expresses "urgent, and either large or from a key account": =IF(AND(D2="urgent", OR(C2>1000, E2="key")), "Approve", "Review"). Every business rule more complicated than a single comparison is built from "all of these" and "any of these", and OR and AND are how you write that down in a way the next person can check. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “use the or function in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Writing
=IF(A2>100 OR B2="urgent", …)as ifORwere an operator; in Excel it is a function that takes the conditions as arguments. - Reaching for
ORwhen the rule is really "all of these", which lets a single condition wave everything through. - Comparing text with = and forgetting it is case-insensitive — use EXACT inside the condition when case matters.
- Using
ORacross a range,=OR(A2:A100>100), and expecting one answer per row; it returns a single TRUE for the whole range. - Leaving a bare
=AND(…)in a report cell, which shows TRUE or FALSE where a reader expects a label.
Frequently asked questions
What is the difference between OR and AND in Excel?
OR returns TRUE when at least one condition is true. AND returns TRUE only when every condition is true. They take exactly the same arguments.
How do I use OR inside an IF?
Put it in the first argument: =IF(OR(A2>100, B2="urgent"), "Flag", ""). The IF turns the TRUE/FALSE verdict into the text or number you actually want.
Can I combine OR and AND?
Yes, nest them: =IF(AND(D2="urgent", OR(C2>1000, E2="key")), "Approve", "Review") means urgent, and either large or a key account.
How many conditions can they take?
Up to 255 each. Beyond a handful, a helper column or a lookup table is usually easier to read and to audit than one long formula.
Other ways people ask this
This is also commonly searched as “excel or function”, “or functions in excel”, “excel functions or” and “excel function or”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel or function”, “or functions in excel”, “excel functions or” all point at the one operation explained on this page, which is why they all lead here.