Available in:All versions (Works in Excel 2007, every later version, Microsoft 365 and Excel for the web)Examples need Excel 2024 or laterCategory:Logical

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.

Difficulty rating 2 of 5. The idea is one line long, but AND skips empty cells instead of counting them as FALSE and collapses a whole range into one answer, and both surprise people.

Last updated: 13 October 2026

See the worked examples

Sheet excerpt: D2 holds the formula
RowABCD
1JournalEntry no.AmountInspect
2MEM25-0412€12,500.00€ 12.500,00TRUETRUE=AND(A2="MEM", C2>=10000)=AND(A2="MEM"; C2>=10000)
3VRK25-0413€48,000.00€ 48.000,00
4MEM25-0414€8,200.00€ 8.200,00
5MEM25-0415€10,000.00€ 10.000,00
6BNK25-0416€15,000.00€ 15.000,00
Formula cell (D2)Input

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]; ...)
Arguments
ArgumentTypeMeaning
logical1RequiredThe first condition, usually a comparison such as B2>=0.95.
logical2OptionalMore 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.

Sheet excerpt: D2 holds the formula
RowABCDE
1JournalEntry no.AmountInspect
2MEM25-0412€12,500.00€ 12.500,00TRUETRUE=AND(A2="MEM", C2>=10000)=AND(A2="MEM"; C2>=10000)
3VRK25-0413€48,000.00€ 48.000,00
4MEM25-0414€8,200.00€ 8.200,00
5MEM25-0415€10,000.00€ 10.000,00
6BNK25-0416€15,000.00€ 15.000,00
7
Formula cell (D2)Input

Formula in D2

=AND(A2="MEM", C2>=10000)
=AND(A2="MEM"; C2>=10000)

Result: TRUE

Step by step
  1. Excel evaluates logical1: A2 holds MEM, so A2="MEM" is TRUE.
  2. It evaluates logical2: C2 holds 12,50012.500, and 12500>=10000 is TRUE.
  3. Both arguments are TRUE, so AND returns TRUE for entry 25-0412.
  4. Copied to D3: VRK is not MEM, so A3="MEM" is FALSE, although 48000>=10000 is TRUE. One FALSE is enough, so the sales entry gets FALSE despite the largest amount.
  5. D4 tests 25-0414: MEM is TRUE but 8200>=10000 is FALSE, so FALSE. D5 sits exactly on the limit: "MEM" matches and 10000>=10000 is TRUE, so TRUE. D6 is a BNK line, 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.

Sheet excerpt: D2 holds the formula
RowABCDEFGH
1RelationDifferenceConfirmedStatusThreshold750750
2D1001€120.00€ 120,00Open=IF(AND(C2=TRUE, B2<=$G$1), "Cleared", "Open")=IF(AND(C2=TRUE; B2<=$G$1); "Cleared"; "Open")
3D1002€0.00€ 0,00TRUE
4D1003€3,400.00€ 3.400,00TRUE
5D1004€300.00€ 300,00FALSE
6D1005€750.00€ 750,00TRUE
7
Formula cell (D2)Input

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
  1. Excel evaluates the AND inside the IF first. C2 is empty (no confirmation for D1001 yet), and C2=TRUE compares that empty cell with TRUE. An empty cell is not TRUE, so the comparison is FALSE.
  2. The second condition is B2<=$G$1: 120<=750, which is TRUE.
  3. AND receives FALSE and TRUE and returns FALSE. IF gets FALSE as its test and returns Open.
  4. Now compare the shorter AND(C2, B2<=$G$1). There C2 is 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.
  5. Copied down: D1002 is TRUE and 0<=750, so Cleared. D1003 is TRUE but 3400<=750 is FALSE, so Open. D1004 is FALSE (the confirmation is not in), so Open. D1005 is TRUE and 750<=750, so Cleared.
  6. Tick the box in C2 and the first condition becomes TRUE, so D2 changes 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.

Sheet excerpt: F3 holds the formula
RowABCDEFG
1Entry no.JournalAmountJournalMEM
225-0501MEM€42,000.00€ 42.000,00Performance materiality2500025000
325-0502VRK€85,000.00€ 85.000,00Entries25-0501=FILTER(A2:A8, (B2:B8=F1) * (C2:C8>=F2))=FILTER(A2:A8; (B2:B8=F1) * (C2:C8>=F2))
425-0503MEM€9,500.00€ 9.500,0025-0504
525-0504MEM€25,000.00€ 25.000,0025-0506
625-0505BNK€31,000.00€ 31.000,00
725-0506MEM€61,500.00€ 61.500,00
825-0507INK€4,200.00€ 4.200,00
9
Formula cell (F3)InputSpilled result

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
  1. 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.
  2. The second condition, C2:C8>=F2 with F2 = 25000, gives TRUE (42000), TRUE (85000), FALSE (9500), TRUE (25000), TRUE (31000), TRUE (61500), FALSE (4200).
  3. 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.
  4. FILTER keeps the rows of A2:A8 where that array is 1: the first, fourth and sixth. The result spills from F3 to F5: 25-0501, 25-0504, 25-0506.
  5. 25-0504 is in the list because >= includes 25000 itself. Change F2 to 50000 and the list shrinks to 25-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.

Sheet excerpt: D2 holds the formula
RowABCDE
1Entry no.PeriodAccountValid
225-06013380008000TRUE=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 <> "") ) ))
325-0602131311001100FALSE
425-060366FALSE
525-06040040004000FALSE
625-0605121213001300TRUE
725-060645004500FALSE
8
Formula cell (D2)InputSpilled result

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
  1. BYROW hands A2:C7 to the LAMBDA one row at a time, under the name rec. The first rec is A2:C2: 25-0601, 3, 8000.
  2. LET names the parts: period is INDEX(rec, 2), the second cell of the row, 3; account is INDEX(rec, 3), 8000.
  3. AND evaluates 3 >= 1 TRUE, 3 <= 12 TRUE and 8000 <> "" TRUE. All three hold, so the first line gets TRUE.
  4. 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.
  5. 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.
  6. BYROW stacks the six answers and spills them from D2 to D7: TRUE, FALSE, FALSE, FALSE, TRUE, FALSE. Change B3 to 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

Common mistakes
SymptomCauseFix
TRUE although a cell is still emptyAND(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 testYou 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 rowYou 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)