OR
OF in Dutch Excel
Returns TRUE when at least one of the conditions you give it is TRUE, and FALSE only when all of them are FALSE.
Last updated: 13 October 2026
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Entry no. | Journal | Amount | Test |
| 2 | 25-0412 | MEM | €1,250.00€ 1.250,00 | TRUETRUE=OR(B2="MEM", C2>=25000)=OR(B2="MEM"; C2>=25000) |
| 3 | 25-0413 | VRK | €18,400.00€ 18.400,00 | |
| 4 | 25-0414 | INK | €6,300.00€ 6.300,00 | |
| 5 | 25-0415 | BNK | €25,000.00€ 25.000,00 | |
| 6 | 25-0416 | MEM | €48,000.00€ 48.000,00 |
Swipe sideways to see all columns
Result: TRUE
=OR(B2="MEM",C2>=25000)
=OR(B2="MEM";C2>=25000)
What OR does and when to use it
What it does: it checks several conditions and returns TRUE when at least one holds, for example a journal line that is manual or above a threshold.
When to use it: whenever one of several reasons is enough, mostly as the test inside IF. Put OR inside AND when a rule mixes both. To test a value against a long list, COUNTIF or XMATCH works better than a long OR.
How Excel evaluates it
Excel evaluates every argument, left to right, even after it has found a TRUE. For each call:
- each argument is reduced to TRUE or FALSE
- arrays and ranges contribute every element, except empty cells and text, which are skipped
- if at least one value is TRUE, OR returns TRUE; otherwise FALSE
- an error in any argument makes the result that error, even when another argument is TRUE
Watch out: In formulas over whole ranges (FILTER, SUM over arrays), add the conditions instead of using OR, because OR returns one value for the whole range.
Mental model
Switches wired in parallel: any one switch that is on lights the lamp, and it only stays dark when every switch is off.
Terms used on this page: error value, array, argument, range, cell
OR(logical1,[logical2], ...)
OR(logical1;[logical2]; ...)
| Argument | Type | Meaning |
|---|---|---|
logical1 | Required | The first condition, usually a comparison such as B2>5000. |
logical2 | Optional | More conditions, up to 255 in total. One TRUE among them is enough. |
Return value:TRUE if at least one condition is TRUE, otherwise FALSE
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Select journal lines for testing: manual or large
For journal entry testing you select every journal line that was posted manually (journal MEM) or that has an amount of 25,00025.000 or more. Either reason is enough. You want a TRUE or FALSE column next to the XAF export that picks out the lines to test.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Amount | Test | |
| 2 | 25-0412 | MEM | €1,250.00€ 1.250,00 | TRUETRUE=OR(B2="MEM", C2>=25000)=OR(B2="MEM"; C2>=25000) | |
| 3 | 25-0413 | VRK | €18,400.00€ 18.400,00 | ||
| 4 | 25-0414 | INK | €6,300.00€ 6.300,00 | ||
| 5 | 25-0415 | BNK | €25,000.00€ 25.000,00 | ||
| 6 | 25-0416 | MEM | €48,000.00€ 48.000,00 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=OR(B2="MEM",C2>=25000)
=OR(B2="MEM";C2>=25000)
Result: TRUE
Step by step
- Excel evaluates logical1:
B2holdsMEM, and "MEM"="MEM" is TRUE. - It still evaluates logical2:
C2holds 1250, and 1250>=25000 is FALSE. - One of the two is TRUE, so OR returns TRUE for entry
25-0412: a manual line, selected whatever its amount. - Copied to
D3:VRKis notMEM, and 18400>=25000 is FALSE, so FALSE.D4:INKand 6300 give FALSE as well. D5holds exactly 25000 in aBNKline. The test uses >=, so 25000>=25000 is TRUE and the line is selected.D6has two reasons (MEMand 48000) and still returns one TRUE.
Watch out: If your selection criterion says 'above 25,00025.000', the test must be C2>25000. With >= the line of exactly 25,00025.000 is selected as well, which changes the sample. Write the boundary down in your working paper.
More on this example: why it works
Why it works
OR only needs one TRUE among its arguments, so each criterion is an independent way to be selected. It does not count how many criteria hold, which is why 25-0416 with two reasons shows the same TRUE as 25-0412 with one.
Intermediate
Confirm receivables above a threshold or in dispute
You send a balance confirmation to every debtor whose balance reaches the threshold in G1, or whose balance is in dispute (TRUE in column C), and you skip the others. The formula is copied down the debtor list from the client's aging report. One balance came in from the export as text, and you want to see what that does.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Debtor | Balance | In dispute | Action | Confirm from | 2500025000 | ||
| 2 | D1001 | €18,200.00€ 18.200,00 | FALSE | SkipSkip=IF(OR(B2>=$G$1, C2), "Confirm", "Skip")=IF(OR(B2>=$G$1; C2); "Confirm"; "Skip") | ||||
| 3 | D1002 | €31,500.00€ 31.500,00 | FALSE | |||||
| 4 | D1003 | €4,800.00€ 4.800,00 | TRUE | |||||
| 5 | D1004 | 9600 | FALSE | |||||
| 6 | D1005 | €25,000.00€ 25.000,00 | FALSE | |||||
| 7 |
Swipe sideways to see all columns
Formula in D2
=IF(OR(B2>=$G$1,C2), "Confirm", "Skip")
=IF(OR(B2>=$G$1;C2); "Confirm"; "Skip")
Result: Skip
Step by step
- Excel evaluates the OR first. logical1 is B2>=$G$1: 18200>=25000, which is FALSE.
- logical2 is
C2, which holds FALSE: the balance is not in dispute. Both are FALSE, so OR returns FALSE. - IF receives FALSE and returns value_if_false: Skip, for
D1001. D3: 31500>=25000 is TRUE, so Confirm.D4: 4800>=25000 is FALSE, butC4is TRUE, so Confirm again. Without the second argument, the disputed balance would not be confirmed.D5compares the text 9600 with the number 25000. Excel does not convert here: in a comparison, any text counts as larger than any number, so "9600">=25000 is TRUE and a small balance is selected for confirmation.D6has exactly 25000, and >= includes it, so Confirm. ChangeG1to 18000 andD2turns to Confirm as well, because 18200>=18000 is TRUE.
Watch out: The text balance in B5 produces the wrong answer without any error. Sort or filter the balance column: text values end up apart from the numbers, where they stand out.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
OR merges two independent reasons for a confirmation into one test, so IF only has two outcomes to choose from. The $ signs keep the threshold pointed at G1 in every copy, so you can change the threshold in one place.
More to watch out for
- If a dispute cell is empty, OR skips it as a bare reference. Here that is harmless, because empty should mean 'not in dispute', but write C2=TRUE if empty must count as FALSE explicitly.
Variations
=IF(OR(B2 * 1 >= $G$1,C2), "Confirm", "Skip")
=IF(OR(B2 * 1 >= $G$1;C2); "Confirm"; "Skip")
Multiplying by 1 turns the text 9600 into the number 9600 before the comparison, so D1004 is skipped. A quick guard until the export is cleaned.
AdvancedExcel 2021 or later (This example needs Excel 2021 or later)
Journal lines for period 12: manual or above threshold
For journal entry testing you want a live list of the entries from the period in G1 that are either manual (journal G2) or above the amount in G3. The rule mixes AND (this period) with OR (either reason), and it has to work on the whole export at once, so both are written as arithmetic.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Amount | Period | Period | 1212 | ||
| 2 | 25-0701 | MEM | €3,500.00€ 3.500,00 | 1212 | Manual journal | MEM | ||
| 3 | 25-0702 | VRK | €42,000.00€ 42.000,00 | 1212 | Amount above | 2000020000 | ||
| 4 | 25-0703 | MEM | €61,000.00€ 61.000,00 | 1212 | Test | 25-0701=FILTER(A2:A8, (D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3)))=FILTER(A2:A8; (D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3))) | ||
| 5 | 25-0704 | MEM | €9,000.00€ 9.000,00 | 1111 | 25-0702 | |||
| 6 | 25-0705 | INK | €7,800.00€ 7.800,00 | 1212 | 25-0703 | |||
| 7 | 25-0706 | BNK | €20,000.00€ 20.000,00 | 1212 | ||||
| 8 | 25-0707 | VRK | €55,000.00€ 55.000,00 | 1111 | ||||
| 9 |
Swipe sideways to see all columns
Formula in G4
=FILTER(A2:A8,(D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3)))
=FILTER(A2:A8;(D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3)))
Result: 25-0701 / 25-0702 / 25-070325-0701 / 25-0702 / 25-0703
Step by step
- Excel evaluates the innermost tests on all seven rows. B2:B8=G2 (
MEM) gives TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE. C2:C8>G3 (above 20000) gives FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE. - The + adds them row by row as 1s and 0s: 1+0, 0+1, 1+1, 1+0, 0+0, 0+0, 0+1, which is 1, 1, 2, 1, 0, 0, 1. Any row above 0 meets at least one reason: that is OR.
- D2:D8=G1 (period 12) gives 1, 1, 1, 0, 1, 1, 0. The * multiplies it with the OR result: 1, 1, 2, 0, 0, 0, 0. That is AND: the period test can switch a row off, whatever the other two said.
- FILTER keeps every row where the include value is not 0, so the 2 for
25-0703counts as a keep in the same way as a 1. The list spills fromG4toG6:25-0701,25-0702,25-0703. 25-0706has exactly 20000 and 20000>20000 is FALSE, so it stays out. ChangeG3to 5000 and25-0705(7800) and25-0706(20000) join the list, which then has five entries.
Watch out: Counting the same rule with SUM gives 4 instead of 3, because 25-0703 meets both reasons and contributes 2. Nothing errors, and your sample size is wrong. Compare the OR part with 0 first, as in the variation.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
Addition behaves like OR on 1s and 0s (the sum is above 0 when any term is 1), and multiplication behaves like AND (the product is 0 when any factor is 0). The brackets decide what is grouped with what, exactly as the words 'and either ... or' do in the selection rule. Both operators work per row, which OR and AND cannot.
More to watch out for
- Writing OR(B2:B8=G2, C2:C8>G3) instead of the + gives one TRUE for the whole list. FILTER then receives one value for seven rows and returns #VALUE! or a wrong result, because the include argument needs one TRUE or FALSE per row.
Variations
=SUM((D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3) > 0))
=SUM((D2:D8=G1) * ((B2:B8=G2) + (C2:C8>G3) > 0))
Counts the entries to test: 3. The > 0 turns each 2 back into a single TRUE, so no row is counted twice.
MasterExcel 2024 or later (This example needs Excel 2024 or later)
Flag unusual postings against a watch list of accounts
In the XAF export you flag a journal line when at least one of these is true:
- its account is on a watch list
- the amount is above 100,000100.000
- it is posted in a period after 12 (an adjustment period after year end)
The watch list lives in F2:F4 and changes now and then. You want one formula that returns TRUE or FALSE for every line, and changing an account on the list must not require editing it.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Account | Amount | Period | Flag | Watch list | |
| 2 | 25-0801 | 40004000 | €4,200.00€ 4.200,00 | 1111 | FALSE=LET( watch, F2:F4, MAP(B2:B6, C2:C6, D2:D6, LAMBDA(account, amt, period, OR(account = watch, amt > 100000, period > 12) )) )=LET( watch; F2:F4; MAP(B2:B6; C2:C6; D2:D6; LAMBDA(account; amt; period; OR(account = watch; amt > 100000; period > 12) )) ) | 18001800 | |
| 3 | 25-0802 | 18001800 | €1,800.00€ 1.800,00 | 1212 | TRUE | 19901990 | |
| 4 | 25-0803 | 80008000 | €125,000.00€ 125.000,00 | 1212 | TRUE | 49904990 | |
| 5 | 25-0804 | 45004500 | €3,000.00€ 3.000,00 | 1313 | TRUE | ||
| 6 | 25-0805 | 16001600 | €98,500.00€ 98.500,00 | 1212 | FALSE | ||
| 7 |
Swipe sideways to see all columns
Formula in E2
=LET( watch,F2:F4, MAP(B2:B6, C2:C6, D2:D6, LAMBDA(account, amt, period, OR(account = watch, amt > 100000, period > 12) )) )
=LET( watch;F2:F4; MAP(B2:B6; C2:C6; D2:D6; LAMBDA(account; amt; period; OR(account = watch; amt > 100000; period > 12) )) )
Result: FALSE / TRUE / TRUE / TRUE / FALSEFALSE / TRUE / TRUE / TRUE / FALSE
Step by step
- LET names the watch list: watch is
F2:F4, holding accounts 1800, 1990 and 4990. - MAP walks down
B2:B6,C2:C6andD2:D6in step and calls the LAMBDA once per line. The first call gets account 4000, amt 4200 and period 11. - account = watch compares 4000 with all three list entries and gives an array: FALSE, FALSE, FALSE. OR accepts that array as one argument and looks at each element.
- The other two tests are 4200 > 100000 FALSE and 11 > 12 FALSE. OR finds no TRUE among the five values and returns FALSE for
25-0801. 25-0802: 1800 = watch gives TRUE, FALSE, FALSE, so TRUE.25-0803: 125000 > 100000 is TRUE.25-0804: period 13 > 12 is TRUE.25-0805misses all three (account 1600, 98500, period 12), so FALSE.- MAP collects the five answers and spills them from
E2toE6: FALSE, TRUE, TRUE, TRUE, FALSE. Type 1600 over 4990 inF4andE6turns TRUE without touching the formula.
Watch out: The mirror-image mistake is writing AND where OR is meant. AND(account = watch, ...) needs the account to equal all three list entries at once, which is impossible, so every line returns FALSE and nothing gets flagged.
More on this example: why it works, 2 more pitfalls, 1 variation
Why it works
OR reads every element of an array argument, so account = watch turns a list lookup into a single OR argument: any match makes the whole test TRUE. MAP gives each line its own call, so OR, which always returns one value, answers per row.
Do not use this construction on a full XAF export: a LAMBDA per row is slow on hundreds of thousands of journal lines. The alternative is ISNUMBER(XMATCH(...)) with added conditions, shown below, which is faster and needs no LAMBDA, at the cost of being harder to read and to extend.
More to watch out for
- OR(B2:B6 = watch, ...) without MAP compares a column of 5 with a list of 3. The two missing positions become #N/A, and OR returns #N/A for everything.
- An empty cell in the watch list compares equal to an empty account cell, so a line with no account is flagged. That is usually what you want, but know why it happens.
Variations
=ISNUMBER(XMATCH(B2:B6,F2:F4)) + (C2:C6 > 100000) + (D2:D6 > 12) > 0
=ISNUMBER(XMATCH(B2:B6;F2:F4)) + (C2:C6 > 100000) + (D2:D6 > 12) > 0
The same rule without LAMBDA: XMATCH finds each account in the list or returns #N/A, ISNUMBER turns that into TRUE or FALSE, and the additions are the OR. Prefer it for large volumes.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| #VALUE! after a bare text argument | OR(B2="North", "South") returns #VALUE!. | Every argument must be a full condition. Write OR(B2="North", B2="South"), or compare against a list: OR(B2 = F2:F3) (in Excel 2019 and earlier, confirm that with Ctrl+Shift+Enter). |
| Count higher than the matching rows | A count built from (condition1) + (condition2) is higher than the number of rows that qualify. | A row that meets both conditions adds up to 2. Compare the sum with 0, ((condition1) + (condition2)) > 0, before counting. |
| FILTER gives #VALUE! or wrong rows | FILTER returns #VALUE! or a wrong result when you use OR as the include argument. | The include argument needs one TRUE or FALSE per row. Add the conditions with +, so each row keeps its own result. |
| The rule finds far too few tickets | AND(B2="IT", C2>10, D2="High") was meant as 'IT, and either old or high priority', and misses most tickets. | Group the alternatives in their own OR: AND(B2="IT", OR(C2>10, D2="High")). |
Used in combinations
- Entries posted on weekends and public holidays with FILTER, WEEKDAY and COUNTIFList the journal entries dated on a Saturday, a Sunday or a Dutch public holiday: WEEKDAY flags the weekends, COUNTIF checks the date against a holiday list, and FILTER keeps the flagged rows.Excel 2021 or later (This combination needs Excel 2021 or later)