AND
EN in Dutch Excel
Returns TRUE only when every condition you give it is TRUE, and FALSE as soon as one of them is not.
Last updated: 13 October 2026
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Journal | Entry no. | Amount | Inspect |
| 2 | MEM | 25-0412 | €12,500.00€ 12.500,00 | TRUETRUE=AND(A2="MEM", C2>=10000)=AND(A2="MEM"; C2>=10000) |
| 3 | VRK | 25-0413 | €48,000.00€ 48.000,00 | |
| 4 | MEM | 25-0414 | €8,200.00€ 8.200,00 | |
| 5 | MEM | 25-0415 | €10,000.00€ 10.000,00 | |
| 6 | BNK | 25-0416 | €15,000.00€ 15.000,00 |
Swipe sideways to see all columns
Result: TRUE
=AND(A2="MEM",C2>=10000)
=AND(A2="MEM";C2>=10000)
What AND does and when to use it
What it does: it checks several conditions at once and returns TRUE only when all of them hold, for example a journal entry that is above the limit and booked manually.
When to use it: inside IF when the outcome depends on more than one condition, or on its own as a flag. Its partner OR needs only one condition to hold.
How Excel evaluates it
Excel evaluates every argument, left to right, and does not stop early. Each one is reduced to TRUE or FALSE; for ranges and arrays, every element counts, except empty cells and text, which are skipped.
The result follows from the values left:
- at least one value is FALSE: FALSE
- all values are TRUE: TRUE
- nothing logical is left after skipping: #VALUE!
- an error in any argument: that error is the whole result
Watch out: Inside FILTER or a SUM over arrays, AND is the wrong tool, because it returns one value for the whole range. Multiply the conditions instead.
Mental model
A row of switches wired in series: the lamp only lights when every switch is on, and one switch off is enough to keep it dark.
Terms used on this page: error value, array, argument, range, cell
AND(logical1,[logical2], ...)
AND(logical1;[logical2]; ...)
| Argument | Type | Meaning |
|---|---|---|
logical1 | Required | The first condition, usually a comparison such as B2>=0.95. |
logical2 | Optional | More conditions, up to 255 in total. All must be TRUE. |
Return value:TRUE if every 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
Flag large manual journal entries
In your journal entry testing you want to select the manual postings from the memorial journal (MEM) with an amount of at least 10,00010.000, because those are the entries you inspect first. You want a column that says TRUE or FALSE per journal line.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Journal | Entry no. | Amount | Inspect | |
| 2 | MEM | 25-0412 | €12,500.00€ 12.500,00 | TRUETRUE=AND(A2="MEM", C2>=10000)=AND(A2="MEM"; C2>=10000) | |
| 3 | VRK | 25-0413 | €48,000.00€ 48.000,00 | ||
| 4 | MEM | 25-0414 | €8,200.00€ 8.200,00 | ||
| 5 | MEM | 25-0415 | €10,000.00€ 10.000,00 | ||
| 6 | BNK | 25-0416 | €15,000.00€ 15.000,00 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=AND(A2="MEM",C2>=10000)
=AND(A2="MEM";C2>=10000)
Result: TRUE
Step by step
- Excel evaluates logical1:
A2holdsMEM, so A2="MEM" is TRUE. - It evaluates logical2:
C2holds 12,50012.500, and 12500>=10000 is TRUE. - Both arguments are TRUE, so AND returns TRUE for entry
25-0412. - Copied to
D3:VRKis notMEM, so A3="MEM" is FALSE, although 48000>=10000 is TRUE. One FALSE is enough, so the sales entry gets FALSE despite the largest amount. D4tests25-0414:MEMis TRUE but 8200>=10000 is FALSE, so FALSE.D5sits exactly on the limit: "MEM" matches and 10000>=10000 is TRUE, so TRUE.D6is aBNKline, so FALSE.
Watch out: If the export writes the journal as "MEM " with a trailing space, A2="MEM" is FALSE for every manual entry and nothing is flagged. Clean the column first with TRIM, or compare TRIM(A2)="MEM".
More on this example: why it works
Why it works
Each comparison produces its own TRUE or FALSE, and AND only lets TRUE through when there is no FALSE among them. The order of the arguments does not matter, because AND always looks at all of them.
Intermediate
Clear a confirmation only when it is received and within the limit
You sent balance confirmations to customers. The sheet lists the difference per relation between the receivables ledger and the confirmed balance, and a column where you tick TRUE once the confirmation has come back.
A relation is cleared when the confirmation is received and the difference is at most the follow-up threshold of 750 in G1. Some confirmations have not arrived yet, so the cell is still empty, and those must stay open.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Relation | Difference | Confirmed | Status | Threshold | 750750 | ||
| 2 | D1001 | €120.00€ 120,00 | Open=IF(AND(C2=TRUE, B2<=$G$1), "Cleared", "Open")=IF(AND(C2=TRUE; B2<=$G$1); "Cleared"; "Open") | |||||
| 3 | D1002 | €0.00€ 0,00 | TRUE | |||||
| 4 | D1003 | €3,400.00€ 3.400,00 | TRUE | |||||
| 5 | D1004 | €300.00€ 300,00 | FALSE | |||||
| 6 | D1005 | €750.00€ 750,00 | TRUE | |||||
| 7 |
Swipe sideways to see all columns
Formula in D2
=IF(AND(C2=TRUE,B2<=$G$1), "Cleared", "Open")
=IF(AND(C2=TRUE;B2<=$G$1); "Cleared"; "Open")
Result: Open
Step by step
- Excel evaluates the AND inside the IF first.
C2is empty (no confirmation forD1001yet), and C2=TRUE compares that empty cell with TRUE. An empty cell is not TRUE, so the comparison is FALSE. - The second condition is B2<=$G$1: 120<=750, which is TRUE.
- AND receives FALSE and TRUE and returns FALSE. IF gets FALSE as its test and returns Open.
- Now compare the shorter AND(C2, B2<=$G$1). There
C2is passed as a bare reference, and AND skips empty cells in references, so only 120<=750 is judged. The result is TRUE and the unconfirmed relation shows Cleared. - Copied down:
D1002is TRUE and 0<=750, so Cleared.D1003is TRUE but 3400<=750 is FALSE, so Open.D1004is FALSE (the confirmation is not in), so Open.D1005is TRUE and 750<=750, so Cleared. - Tick the box in
C2and the first condition becomes TRUE, soD2changes to Cleared.
Watch out: If someone types the word ja in column C instead of TRUE, C2=TRUE is FALSE and the relation stays Open forever. Use data validation so the column only holds TRUE or FALSE.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
A comparison always produces a TRUE or FALSE, even when one side is empty, so AND has a real value to judge. Passing the bare cell hands AND an empty reference, which it is designed to skip. Writing C2=TRUE looks redundant, but it is what turns 'not received yet' into FALSE.
More to watch out for
- Differences exported as signed amounts can be negative, and -3400<=750 is TRUE. Compare the absolute difference with ABS(B2)<=$G$1 when both directions matter.
Variations
=IF(AND(C2=TRUE,B2<=$G$1), 0, B2)
=IF(AND(C2=TRUE;B2<=$G$1); 0; B2)
Return the difference that is still open instead of a label, so a SUM over column D gives the total you still have to explain.
AdvancedExcel 2021 or later (This example needs Excel 2021 or later)
List journal lines from one journal above performance materiality
For journal entry testing you want a live list of entry numbers from the journal in F1 with an amount of at least the performance materiality in F2. The list must update when either input changes.
FILTER needs one TRUE or FALSE per row, which is exactly what AND cannot deliver, so the two conditions are multiplied.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Amount | Journal | MEM | ||
| 2 | 25-0501 | MEM | €42,000.00€ 42.000,00 | Performance materiality | 2500025000 | ||
| 3 | 25-0502 | VRK | €85,000.00€ 85.000,00 | Entries | 25-0501=FILTER(A2:A8, (B2:B8=F1) * (C2:C8>=F2))=FILTER(A2:A8; (B2:B8=F1) * (C2:C8>=F2)) | ||
| 4 | 25-0503 | MEM | €9,500.00€ 9.500,00 | 25-0504 | |||
| 5 | 25-0504 | MEM | €25,000.00€ 25.000,00 | 25-0506 | |||
| 6 | 25-0505 | BNK | €31,000.00€ 31.000,00 | ||||
| 7 | 25-0506 | MEM | €61,500.00€ 61.500,00 | ||||
| 8 | 25-0507 | INK | €4,200.00€ 4.200,00 | ||||
| 9 |
Swipe sideways to see all columns
Formula in F3
=FILTER(A2:A8,(B2:B8=F1) * (C2:C8>=F2))
=FILTER(A2:A8;(B2:B8=F1) * (C2:C8>=F2))
Result: 25-0501 / 25-0504 / 25-050625-0501 / 25-0504 / 25-0506
Step by step
- Excel evaluates the first condition for all seven rows: B2:B8=F1 compares each journal with MEM and gives TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE.
- The second condition, C2:C8>=F2 with F2 = 25000, gives TRUE (42000), TRUE (85000), FALSE (9500), TRUE (25000), TRUE (31000), TRUE (61500), FALSE (4200).
- The * turns TRUE into 1 and FALSE into 0 and multiplies row by row: 1×1, 0×1, 1×0, 1×1, 0×1, 1×1, 0×0, which is 1, 0, 0, 1, 0, 1, 0. A row is 1 only when both conditions hold: the AND logic, per row.
- FILTER keeps the rows of
A2:A8where that array is 1: the first, fourth and sixth. The result spills fromF3toF5:25-0501,25-0504,25-0506. 25-0504is in the list because >= includes 25000 itself. ChangeF2to 50000 and the list shrinks to25-0506.
Watch out: Writing FILTER(A2:A8, AND(B2:B8=F1, C2:C8>=F2)) looks natural, but AND squeezes all fourteen tests into one FALSE. FILTER then gets one value for seven rows and returns #VALUE!.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
Multiplication is AND for 1s and 0s: a product is 1 only when every factor is 1. Unlike AND, the * operator works element by element, so each row keeps its own answer and FILTER gets an include array the same height as the data.
More to watch out for
- Using > instead of >= silently drops 25-0504 at exactly 25000. Nothing errors; the list is one entry shorter. Test with a value that sits on the limit.
- When no row matches, FILTER returns #CALC!. Add a third argument, such as a text, to show a message instead.
Variations
=SUM((B2:B8=F1) * (C2:C8>=F2))
=SUM((B2:B8=F1) * (C2:C8>=F2))
Count the matching entries instead of listing them: the 1s add up to 3.
=COUNTIFS(B2:B8,F1, C2:C8, ">=" & F2)
=COUNTIFS(B2:B8;F1; C2:C8; ">=" & F2)
COUNTIFS applies AND logic between its criteria without any multiplication. Prefer it for plain counts; use the multiplication when you need the rows themselves.
MasterExcel 2024 or later (This example needs Excel 2024 or later)
Validate every journal line with one spilled formula
Before you rely on an XAF auditfile export, every journal line must pass three completeness checks: period at least 1, period at most 12, and a ledger account filled in. You want one formula that returns TRUE or FALSE for every line and grows with the export, readable enough for a colleague to add a fourth check later.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Entry no. | Period | Account | Valid | |
| 2 | 25-0601 | 33 | 80008000 | TRUE=BYROW(A2:C7, LAMBDA(rec, LET( period, INDEX(rec, 2), account, INDEX(rec, 3), AND(period >= 1, period <= 12, account <> "") ) ))=BYROW(A2:C7; LAMBDA(rec; LET( period; INDEX(rec; 2); account; INDEX(rec; 3); AND(period >= 1; period <= 12; account <> "") ) )) | |
| 3 | 25-0602 | 1313 | 11001100 | FALSE | |
| 4 | 25-0603 | 66 | FALSE | ||
| 5 | 25-0604 | 00 | 40004000 | FALSE | |
| 6 | 25-0605 | 1212 | 13001300 | TRUE | |
| 7 | 25-0606 | 45004500 | FALSE | ||
| 8 |
Swipe sideways to see all columns
Formula in D2
=BYROW(A2:C7,LAMBDA(rec, LET( period, INDEX(rec, 2), account, INDEX(rec, 3), AND(period >= 1, period <= 12, account <> "") ) ))
=BYROW(A2:C7;LAMBDA(rec; LET( period; INDEX(rec; 2); account; INDEX(rec; 3); AND(period >= 1; period <= 12; account <> "") ) ))
Result: TRUE / FALSE / FALSE / FALSE / TRUE / FALSETRUE / FALSE / FALSE / FALSE / TRUE / FALSE
Step by step
- BYROW hands
A2:C7to the LAMBDA one row at a time, under the name rec. The first rec isA2:C2:25-0601, 3, 8000. - LET names the parts: period is INDEX(rec, 2), the second cell of the row, 3; account is INDEX(rec, 3), 8000.
- AND evaluates 3 >= 1 TRUE, 3 <= 12 TRUE and 8000 <> "" TRUE. All three hold, so the first line gets TRUE.
- Line 2 fails on 13 <= 12. Line 3 has an empty account, and "" <> "" is FALSE. Because the empty cell sits inside a comparison, it counts as a failed check instead of being skipped.
- Line 4 fails on 0 >= 1. Line 5 (12, account 1300) passes. Line 6 has an empty period, which compares as 0, so 0 >= 1 is FALSE.
- BYROW stacks the six answers and spills them from
D2toD7: TRUE, FALSE, FALSE, FALSE, TRUE, FALSE. ChangeB3to 11 and the second line turns TRUE.
Watch out: The mirror-image mistake is AND(B2:B7 >= 1, B2:B7 <= 12, C2:C7 <> "") without BYROW. It returns one FALSE in D2, which looks like a result for the first line, while it really says that not every line is valid.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
AND always returns one answer for all its arguments together, so on a whole range it cannot give one answer per row. BYROW solves that by calling the LAMBDA separately for each row, and inside that call AND sees only one row's values.
LET names the columns, so a fourth check is one more line in the AND. Do not use this construction on a journal with hundreds of thousands of lines: a LAMBDA called per row is noticeably slower than plain array arithmetic.
The alternative is the multiplication version below, which is faster and works the same for these three checks, but becomes hard to read once checks need OR logic or text tests.
More to watch out for
- If periods arrive as text (a 3 with a leading apostrophe), "3" >= 1 is TRUE because text ranks above numbers, and for the same reason "3" <= 12 is FALSE. Lines then fail for a reason that is invisible on screen. Check with ISNUMBER.
Variations
=(B2:B7 >= 1) * (B2:B7 <= 12) * (C2:C7 <> "") = 1
=(B2:B7 >= 1) * (B2:B7 <= 12) * (C2:C7 <> "") = 1
The same three checks as array arithmetic: the product is 1 only when all hold, and = 1 turns it back into TRUE or FALSE. Faster on large exports.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| TRUE although a cell is still empty | AND(C2, D2) returns TRUE although C2 is still empty. | An empty cell passed as a reference is skipped, so only D2 is judged. Compare explicitly: AND(C2=TRUE, D2=TRUE), where the empty cell makes the comparison FALSE. |
| FALSE on every row of a range test | You wrote =10<=B2<=20 to test a range of values, and it is FALSE for every row. | Excel compares left to right: 10<=B2 gives TRUE, then TRUE<=20 is FALSE because a logical value ranks above every number. Write AND(B2>=10, B2<=20). |
| One TRUE or FALSE instead of one per row | You used AND(B2:B8=F1, C2:C8>=F2) as the include argument of FILTER and got one single TRUE or FALSE instead of one per row. | The condition must give one answer per row. The product (B2:B8=F1) * (C2:C8>=F2) gives 1 or 0 per row. |
Used in combinations
- Round-sum journal entries with FILTER, MOD, ROUND and ABSFlag ledger lines whose amount is an exact multiple of 1,000 (and above a minimum): ABS removes the sign, ROUND clears floating-point noise, MOD tests the multiple and FILTER lists the lines.Excel 2021 or later (This combination needs Excel 2021 or later)