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

IF

ALS in Dutch Excel

Checks a condition and returns one value when it holds and another value when it does not.

Difficulty rating 2 of 5. One test and two outcomes is quick to learn; the order of nested tests and the difference between a blank cell and a zero take practice.

Last updated: 13 October 2026

See the worked examples

Sheet excerpt: C2 holds the formula
RowABC
1AccountDifferenceFollow-up
21300 Receivables€4,250.00€ 4.250,00Investigate=IF(B2>=1500, "Investigate", "Below threshold")=IF(B2>=1500; "Investigate"; "Below threshold")
31600 Payables€1,500.00€ 1.500,00
41100 Bank€0.00€ 0,00
51800 VAT payable€12,800.00€ 12.800,00
64500 Premises costs€380.00€ 380,00
Formula cell (C2)Input

Result: Investigate

=IF(B2>=1500, "Investigate", "Below threshold")
=IF(B2>=1500; "Investigate"; "Below threshold")

What IF does and when to use it

What it does: it checks a condition and returns one value when it holds and another when it does not, for example Investigate or Below threshold next to a reconciling difference.

When to use it: for pass or fail labels, for choosing between two calculations, and for keeping a formula away from data that is not there yet. With three or more bands IFS reads better; with many bands a lookup table with XLOOKUP is simpler to maintain.

How Excel evaluates it

Excel evaluates logical_test first and reduces it to TRUE or FALSE. With TRUE it calculates value_if_true and returns that; with FALSE it calculates value_if_false, or returns FALSE when that argument is missing.

For a single test the branch that is not chosen is never calculated, so IF(B2=0, 0, A2/B2) cannot produce #DIV/0!. When the test is a whole range, Excel tests every row, calculates both branches for all rows and picks per row, and the result spills.

Watch out: In a comparison with a number, an empty cell counts as 0.

Mental model

A railway switch: the test sets the switch once, and the train runs down exactly one of the two tracks.

Terms used on this page: spill, argument, range

IF(logical_test, value_if_true, [value_if_false])
IF(logical_test; value_if_true; [value_if_false])
Arguments
ArgumentTypeMeaningDefault
logical_testRequiredA comparison or value that comes out as TRUE or FALSE.
value_if_trueRequiredWhat the cell shows when the test is TRUE.
value_if_falseOptionalWhat the cell shows when the test is FALSE. Left out, you get FALSE.FALSE

Return value:value_if_true or value_if_false, depending on the test

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 reconciling differences against the follow-up threshold

You reconcile the ledger to the client's specifications and list the difference per account. Differences of 1,5001.500 or more must be followed up; anything below that stays on the schedule without follow-up. A difference of exactly 1,5001.500 counts as follow-up.

You want a column that says Investigate or Below threshold, so the working paper shows at a glance what is left to do.

Sheet excerpt: C2 holds the formula
RowABCD
1AccountDifferenceFollow-up
21300 Receivables€4,250.00€ 4.250,00Investigate=IF(B2>=1500, "Investigate", "Below threshold")=IF(B2>=1500; "Investigate"; "Below threshold")
31600 Payables€1,500.00€ 1.500,00
41100 Bank€0.00€ 0,00
51800 VAT payable€12,800.00€ 12.800,00
64500 Premises costs€380.00€ 380,00
7
Formula cell (C2)Input

Formula in C2

=IF(B2>=1500, "Investigate", "Below threshold")
=IF(B2>=1500; "Investigate"; "Below threshold")

Result: Investigate

Step by step
  1. Excel reads B2 and finds 4250 (the difference on account 1300 Receivables). That value goes into logical_test.
  2. It evaluates 4250>=1500. The comparison holds, so logical_test becomes TRUE.
  3. With TRUE, IF returns value_if_true: the text Investigate. The third argument is not looked at.
  4. Copy the formula down. C3 tests 1500>=1500 for account 1600 Payables. That is TRUE, so the difference is followed up. With > instead of >= the test would be 1500>1500, FALSE, and the difference on the exact threshold would escape.
  5. C4 tests 0>=1500 for the bank: FALSE, so Below threshold. C5 tests 12800>=1500: TRUE, Investigate. C6 tests 380>=1500: FALSE, Below threshold.

Watch out: An empty difference cell counts as 0 in the comparison, so an account that is not reconciled yet shows Below threshold. The Intermediate example tests for empty cells first.

More on this example: why it works

Why it works

The comparison B2>=1500 is the whole decision; IF only translates its TRUE or FALSE into a label the reviewer understands. The reference B2 is relative, so each copy tests the difference in its own row.

Intermediate

Debtor confirmations: no reply is not the same as zero

You sent balance confirmations to your customers at 31 December 2025. In column C you enter the balance each customer confirmed. An empty cell means the customer has not replied yet and you still have to follow up; a 0 means the customer confirmed that they owe nothing. You want the difference with the ledger per customer, and a clear note for each customer who has not replied.

Sheet excerpt: D2 holds the formula
RowABCDE
1RelationLedger balanceConfirmed balanceDifference
2D1001€18,250.00€ 18.250,00€17,900.00€ 17.900,00€350.00€ 350,00=IF(C2="", "No reply", B2-C2)=IF(C2=""; "No reply"; B2-C2)
3D1002€6,400.00€ 6.400,00
4D1003€4,200.00€ 4.200,00€0.00€ 0,00
5D1004€9,800.00€ 9.800,00€9,800.00€ 9.800,00
6D1005€15,600.00€ 15.600,00
7
Formula cell (D2)Input

Formula in D2

=IF(C2="", "No reply", B2-C2)
=IF(C2=""; "No reply"; B2-C2)

Result: €350.00€ 350,00

Step by step
  1. Excel reads C2 and finds 17900. The test C2="" asks whether the cell is empty; it is not, so logical_test is FALSE.
  2. With FALSE, IF calculates value_if_false: B2-C2 = 18250 - 17900 = 350. That is the difference to explain for D1001.
  3. Copied to D3, the test reads C3, which is empty. C3="" is TRUE, so the cell shows No reply and the subtraction is never calculated.
  4. D4 reads the 0 of D1003. A zero is a value, not an empty cell, so C4="" is FALSE and the result is 4200 - 0 = 4200: the customer disputes the whole balance.
  5. Had you written the test as C2=0, an empty cell would count as 0 as well, and D1002 would show a difference of 6400 - 0 = 6400 instead of No reply. Testing for "" keeps the two cases apart.
  6. D5 gives 9800 - 9800 = 0, a confirmed balance without difference. D6 is empty in C6, so No reply. Leave out the third argument and every row with a reply shows FALSE instead of a difference.

Watch out: A cell that contains a space looks empty but is not, so C2="" is FALSE and the subtraction returns #VALUE!. Clear such cells with the Delete key.

More on this example: why it works, 1 more pitfall, 1 variation

Why it works

Comparing a cell with "" is TRUE only for an empty cell (or one holding empty text), while a comparison with 0 treats empty and zero alike. Putting the empty test first means the subtraction only runs on rows with a real confirmation.

More to watch out for

  • The text No reply in column D is ignored by SUM, so a total over D2:D6 looks complete while two confirmations are outstanding. Count the gaps next to it.

Variations

=IF(ISBLANK(C2), "No reply", B2-C2)
=IF(ISBLANK(C2); "No reply"; B2-C2)

ISBLANK is stricter: a cell holding empty text from another formula is not blank to ISBLANK. Prefer it when column C is typed in by hand.

Advanced

Provision on overdue receivables in three bands with nested tests

In the aging list of Veldhuis Installatie BV you recalculate the provision for doubtful debts, with a percentage of the open amount per band:

  • 50% when an invoice is 90 days or more overdue
  • 10% from 30 days
  • 2% below that

The percentage applies to the whole open amount, not per slice. You want one formula per invoice that picks the percentage and multiplies, and an invoice at exactly 90 days must fall in the top band.

Sheet excerpt: D2 holds the formula
RowABCDE
1Invoice no.Days overdueOpen amountProvision
226-01184747€12,000.00€ 12.000,00€1,200.00€ 1.200,00=C2 * IF(B2>=90, 0.5, IF(B2>=30, 0.1, 0.02))=C2 * IF(B2>=90; 0,5; IF(B2>=30; 0,1; 0,02))
326-0071112112€8,400.00€ 8.400,00
426-01423030€5,000.00€ 5.000,00
526-02031212€7,350.00€ 7.350,00
626-00549090€3,000.00€ 3.000,00
7
Formula cell (D2)Input

Formula in D2

=C2 * IF(B2>=90, 0.5, IF(B2>=30, 0.1, 0.02))
=C2 * IF(B2>=90; 0,5; IF(B2>=30; 0,1; 0,02))

Result: €1,200.00€ 1.200,00

Step by step
  1. Excel evaluates the outer IF first. B2 holds 47, and 47>=90 is FALSE, so it moves to value_if_false, which is the inner IF.
  2. The inner IF tests 47>=30. That is TRUE, so the inner IF returns 0.1. The 0.02 is never reached.
  3. The outer IF passes 0.1 on, and the multiplication runs: 12000 × 0.1 = 1200.
  4. Copied down: invoice 26-0071 at 112 days passes the first test, 8400 × 0.5 = 4200. Invoice 26-0142 at exactly 30 days fails the first test and passes the second because of >=, 5000 × 0.1 = 500.
  5. Invoice 26-0203 at 12 days fails both tests and lands on the last value: 7350 × 0.02 = 147. Invoice 26-0054 at exactly 90 days passes the first test because of >=, so 3000 × 0.5 = 1500.

Watch out: Swap the two tests and the formula still returns a number for every row, but invoices 26-0071 and 26-0054 get 10% instead of 50%, because 112>=30 is already TRUE. Nothing on the sheet looks broken.

More on this example: why it works, 1 more pitfall, 2 variations

Why it works

Nested IFs are checked from the outside in, and the first TRUE ends the search. Because the thresholds are tested from high to low, each invoice stops at the highest band it reaches. The IF only chooses the percentage; the multiplication sits outside it, so the calculation is written once.

More to watch out for

  • When the client's policy changes, the percentages are hidden inside the formula in every row. With more than three bands, move them to a table and use XLOOKUP with match_mode -1.

Variations

=C2 * IFS(B2>=90, 0.5, B2>=30, 0.1, TRUE, 0.02)
=C2 * IFS(B2>=90; 0,5; B2>=30; 0,1; TRUE; 0,02)

IFS lists test and result in pairs without nesting; the final TRUE acts as 'everything else'. Prefer it from three bands up, in Excel 2019 and later.

=C2 * IF(B2<30, 0.02, IF(B2<90, 0.1, 0.5))
=C2 * IF(B2<30; 0,02; IF(B2<90; 0,1; 0,5))

The same bands tested from low to high with <. Either order works as long as the operator matches the direction.

MasterExcel 2021 or later (This example needs Excel 2021 or later)

Trial balance against client specifications for all accounts at once

You compare the year-end balance per account in the trial balance with the balance in the specification the client delivered. Performance materiality is 15,00015.000 (cell F2). Where the absolute difference exceeds it, you want the difference to follow up; otherwise 0.

An empty specification cell means the client has not delivered that specification yet, and the account must not be cleared by accident; a 0 means the specification shows a nil balance.

Sheet excerpt: D2 holds the formula
RowABCDEFG
1AccountTrial balanceSpecificationTo follow upPerformance materiality
21300 Receivables€482,300.00€ 482.300,00€455,800.00€ 455.800,00€26,500.00€ 26.500,00=LET( ledger, B2:B7, spec, C2:C7, pm, $F$2, IF(spec = "", "Request specification", IF(ABS(ledger - spec) > pm, ledger - spec, 0)) )=LET( ledger; B2:B7; spec; C2:C7; pm; $F$2; IF(spec = ""; "Request specification"; IF(ABS(ledger - spec) > pm; ledger - spec; 0)) )1500015000
31100 Bank€184,500.00€ 184.500,00€184,500.00€ 184.500,00€0.00€ 0,00
41600 Payables€231,400.00€ 231.400,00Request specification
51800 VAT payable€38,200.00€ 38.200,00€0.00€ 0,00€38,200.00€ 38.200,00
63000 Inventory€96,700.00€ 96.700,00€91,000.00€ 91.000,00€0.00€ 0,00
74500 Premises costs€58,800.00€ 58.800,00€76,300.00€ 76.300,00-€17,500.00€ -17.500,00
8
Formula cell (D2)InputSpilled result

Formula in D2

=LET(
  ledger, B2:B7,
  spec, C2:C7,
  pm, $F$2,
  IF(spec = "", "Request specification", IF(ABS(ledger - spec) > pm, ledger - spec, 0))
)
=LET(
  ledger; B2:B7;
  spec; C2:C7;
  pm; $F$2;
  IF(spec = ""; "Request specification"; IF(ABS(ledger - spec) > pm; ledger - spec; 0))
)

Result: €26,500.00 / €0.00 / Request specification / €38,200.00 / €0.00 / -€17,500.00€ 26.500,00 / € 0,00 / Request specification / € 38.200,00 / € 0,00 / € -17.500,00

Step by step
  1. LET names the inputs: ledger is B2:B7 (482300, 184500, 231400, 38200, 96700, 58800), spec is C2:C7 (455800, 184500, empty, 0, 91000, 76300) and pm is $F$2 = 15000.
  2. The outer IF tests spec = "" for all six rows at once: FALSE, FALSE, TRUE, FALSE, FALSE, FALSE. Only the payables specification is missing; the 0 for VAT payable is a real value.
  3. The differences ledger - spec are 482300 - 455800 = 26500; 184500 - 184500 = 0; 231400 - 0 = 231400 for the empty row; 38200 - 0 = 38200; 96700 - 91000 = 5700; 58800 - 76300 = -17500.
  4. The inner test compares the absolute difference with pm: 26500>15000 TRUE; 0>15000 FALSE; 231400>15000 TRUE; 38200>15000 TRUE; 5700>15000 FALSE; 17500>15000 TRUE. Where it is TRUE, the signed difference is returned, where FALSE, 0.
  5. Because the test is a whole range, Excel calculates both branches for every row and then picks per row. The outer IF overrules the 231400 of the payables with Request specification, and the result spills from D2 to D7: 26500, 0, Request specification, 38200, 0, -17500.
  6. Type 220000 in C4 and the payables row becomes 231400 - 220000 = 11400, and 11400>15000 is FALSE, so 0. Nothing else in the spill changes.

Watch out: The mirror-image mistake is testing spec = 0 instead of spec = "". The payables row still shows Request specification, but so does VAT payable, and the 38200 difference on the one account whose specification really shows nil is never followed up.

More on this example: why it works, 1 more pitfall, 1 variation

Why it works

The empty test sits outside the materiality test, so an account without a specification can never look cleared, while a genuine 0 is compared like any other balance. LET gives each input a name, so the audit rule reads as written, and one formula serves the whole trial balance without being copied.

Do not use this construction when the rule grows to four or five outcomes; a lookup table with XLOOKUP keeps the rules visible on the sheet instead of inside a formula. The alternative for older Excel versions is a plain IF per row, copied down, which is longer to maintain but works without dynamic arrays.

More to watch out for

  • Request specification is text. A total over D2:D7 with SUM ignores it silently, so the sum of differences looks complete; a calculation such as D2:D7 * 1 returns #VALUE! in that row, which is the signal you want.

Variations

=ABS(B2:B7 - C2:C7) > $F$2
=ABS(B2:B7 - C2:C7) > $F$2

When you only need a flag, skip IF: the comparison already spills TRUE or FALSE per row. Never write IF(test, "TRUE", "FALSE"), which turns the flags into text.

Common mistakes

Common mistakes
SymptomCauseFix
Results are text, not TRUE or FALSEYou wrote IF(B2>C2, "TRUE", "FALSE") and later a filter or a count on that column does not treat the results as TRUE and FALSE.The quotes made them text. Write TRUE and FALSE without quotes, or drop IF entirely: =B2>C2 already returns TRUE or FALSE.
Top performers get the middle rateA nested IF tests C2>=20000 before C2>=50000, and the top performers get the middle rate.IF stops at the first test that is TRUE. With 'greater than or equal' tests, start at the highest threshold and work down.
Empty cells are treated as zeroIF(C2=0, ...) is meant to catch zeros but also fires on empty cells.Test C2="" for empty, and test zero only after that.
The word FALSE appears in the cellCells show the word FALSE where you expected them to stay empty.value_if_false was left out. Add it, and use "" if the cell should look empty.

Used in combinations