MATCH
VERGELIJKEN in Dutch Excel
Tells you where a value sits in a single row or column, as a position number counted from the start of that range.
Last updated: 13 October 2026
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Account | Debit | Entry no. | Position in export | |
| 2 | 25-0407 | VRK | 13001300 | €12,100.00€ 12.100,00 | 25-0412 | 33=MATCH(F2, A2:A7, 0)=MATCH(F2; A2:A7; 0) | |
| 3 | 25-0415 | BNK | 11001100 | €4,500.00€ 4.500,00 | |||
| 4 | 25-0412 | INK | 45004500 | €3,250.00€ 3.250,00 | |||
| 5 | 25-0431 | MEM | 40004000 | €18,900.00€ 18.900,00 | |||
| 6 | 25-0409 | VRK | 13001300 | €6,050.00€ 6.050,00 | |||
| 7 | 25-0420 | INK | 16001600 | €2,400.00€ 2.400,00 |
Swipe sideways to see all columns
Result: 3
=MATCH(F2,A2:A7, 0)
=MATCH(F2;A2:A7; 0)
What MATCH does and when to use it
What it does: it returns the position of a value in a range, for example 3 when the invoice number is the third entry in the list.
When to use it: when you need a position: the row of a key for INDEX, the column of a header, or the band a value falls into. If you only want the value next to the key and have Excel 2021 or later, XLOOKUP does it in one step. XMATCH is the newer version with an exact match as its default.
How Excel evaluates it
Excel reads lookup_value and then looks at match_type:
- 0: walks the range from the first cell and stops at the first cell that equals the value, ignoring case and honouring wildcards in text
- 1: assumes the range is sorted ascending and returns the position of the largest value that does not exceed lookup_value
- -1: assumes descending order and returns the position of the smallest value that is not below it
The result is the position within the range, counted from 1. If nothing qualifies, the result is #N/A.
Watch out: Without 0 as the third argument MATCH searches approximately, not exactly: on an unsorted list it returns a wrong position or #N/A even though the value is there.
Mental model
A cloakroom ticket: MATCH does not hand you the coat, it hands you the number of the hook. INDEX is the attendant who fetches what hangs there.
MATCH(lookup_value,lookup_array, [match_type])
MATCH(lookup_value;lookup_array; [match_type])
| Argument | Type | Meaning | Default |
|---|---|---|---|
lookup_value | Required | The value whose position you want. | |
lookup_array | Required | The single row or column to search. | |
match_type | Optional | 0 exact; 1 largest value <= (ascending data); -1 smallest value >= (descending data). | 1 |
Return value:A number: the position of the match within lookup_array, or #N/A
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
Position of a journal entry in the auditfile export
You have the journal lines of the XAF auditfile in a sheet. The client's controller asks you to look at entry 25-0412, and you want to know how far down the export it sits, so you can point to the right line. You need the position in the list, not the amount.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Account | Debit | Entry no. | Position in export | ||
| 2 | 25-0407 | VRK | 13001300 | €12,100.00€ 12.100,00 | 25-0412 | 33=MATCH(F2, A2:A7, 0)=MATCH(F2; A2:A7; 0) | ||
| 3 | 25-0415 | BNK | 11001100 | €4,500.00€ 4.500,00 | ||||
| 4 | 25-0412 | INK | 45004500 | €3,250.00€ 3.250,00 | ||||
| 5 | 25-0431 | MEM | 40004000 | €18,900.00€ 18.900,00 | ||||
| 6 | 25-0409 | VRK | 13001300 | €6,050.00€ 6.050,00 | ||||
| 7 | 25-0420 | INK | 16001600 | €2,400.00€ 2.400,00 | ||||
| 8 |
Swipe sideways to see all columns
Formula in G2
=MATCH(F2,A2:A7, 0)
=MATCH(F2;A2:A7; 0)
Result: 33
Step by step
- Excel reads
F2and finds the text25-0412. That is lookup_value. - match_type is 0, so Excel looks for an exact match from the top of
A2:A7:25-0407, no;25-0415, no (similar digits, different number);25-0412, yes. - The match is the third cell of the range,
A4. MATCH returns 3: the position, not the debit amount and not the account. A4is row 4 of the sheet, but the position is 3, because counting starts atA2, the first cell of the range.- Type
25-0420inF2and the result becomes 6.
Watch out: Without the 0, MATCH assumes the entry numbers are sorted and searches by halving the list. On this unsorted export it can return a wrong position or #N/A, with no hint that something is off.
More on this example: why it works
Why it works
The export is in the order the client's system wrote it, not sorted by entry number, so only an exact search can be trusted, and match_type 0 is exactly that. Because MATCH reports a position, the answer already means something here: it is the line of the list where the entry sits.
Intermediate
Ageing band number from days overdue
For the receivables ageing analysis you sort each open invoice into a band by days overdue:
- 0 to 30
- 31 to 60
- 61 to 90
- 91 to 120
- over 120
The band number feeds a summary elsewhere in the workbook. An invoice that is 47 days overdue must land in the band that starts at 31.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Days overdue from | Band | Relation | Days overdue | Band no. | ||
| 2 | 00 | 0 to 30 days | D1001 | 4747 | 22=MATCH(E2, $A$2:$A$6, 1)=MATCH(E2; $A$2:$A$6; 1) | ||
| 3 | 3131 | 31 to 60 days | D1002 | 3030 | |||
| 4 | 6161 | 61 to 90 days | D1003 | 134134 | |||
| 5 | 9191 | 91 to 120 days | |||||
| 6 | 121121 | Over 120 days | |||||
| 7 |
Swipe sideways to see all columns
Formula in F2
=MATCH(E2,$A$2:$A$6, 1)
=MATCH(E2;$A$2:$A$6; 1)
Result: 22
Step by step
- Excel reads
E2: the open invoice ofD1001is 47 days overdue. - match_type 1 tells MATCH that
A2:A6is sorted ascending and that it should return the largest value not above 47. 0 and 31 qualify; 61 is too high. - 31 is the second cell of the range,
A3, so MATCH returns 2: band 2, 31 to 60 days. - With match_type 0 the same formula returns #N/A, because 47 does not appear in
A2:A6. The third argument is what turns 'find this value' into 'find the band'. - Copied to
F3, the formula reads 30. Only 0 is not above 30, because 31 is higher, so the result is 1: an invoice 30 days overdue is still in the first band. - In
F4, 134 is above the last start, 121, so the result is 5, over 120 days. The $ signs kept the range atA2:A6in every copy.
Watch out: An invoice that is not yet due has negative days overdue, which is below 0 and returns #N/A. Decide whether those invoices belong in a 'not due' band and handle them before MATCH.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
In a sorted list of band starts, 'the last start you have passed' is the band you are in, and that is what match_type 1 finds. Because the band starts are listed in band order, the position is the band number itself, so no second column is needed.
More to watch out for
- If someone adds a band at the bottom of the table out of order, every result above it can shift. Keep the band table sorted ascending.
Variations
=INDEX($B$2:$B$6,MATCH(E2, $A$2:$A$6, 1))
=INDEX($B$2:$B$6;MATCH(E2; $A$2:$A$6; 1))
Wrap it in INDEX to show the band label, 31 to 60 days, instead of the number.
Advanced
Sample size from a population band and risk level
Your audit methodology sets the number of items to test in a sample by the value of the population and by the assessed risk. Population value bands run down the side and risk levels across the top. For any population value and risk level you need the sample size, where the value falls between bands and the risk level must match exactly.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Population from | Low | Medium | High | Risk level | Medium | ||
| 2 | €0.00€ 0,00 | 1515 | 2525 | 4040 | Population value | 34000003400000 | ||
| 3 | €500,000.00€ 500.000,00 | 2020 | 3535 | 5555 | Sample size | 4545=INDEX(B2:D5, MATCH(G2, A2:A5, 1), MATCH(G1, B1:D1, 0))=INDEX(B2:D5; MATCH(G2; A2:A5; 1); MATCH(G1; B1:D1; 0)) | ||
| 4 | €2,000,000.00€ 2.000.000,00 | 2525 | 4545 | 7070 | ||||
| 5 | €10,000,000.00€ 10.000.000,00 | 3030 | 5555 | 9090 | ||||
| 6 |
Swipe sideways to see all columns
Formula in G3
=INDEX(B2:D5,MATCH(G2, A2:A5, 1), MATCH(G1, B1:D1, 0))
=INDEX(B2:D5;MATCH(G2; A2:A5; 1); MATCH(G1; B1:D1; 0))
Result: 4545
Step by step
- Excel evaluates the first MATCH: it looks for 3400000 in
A2:A5with match_type 1. 0, 500000 and 2000000 are not above 3400000; 10000000 is. The largest qualifying value, 2000000, is the third cell, so this MATCH returns 3. - Excel evaluates the second MATCH: it looks for Medium in
B1:D1with match_type 0. Low, no; Medium, yes. It returns 2. - INDEX receives row 3 and column 2 of
B2:D5. Row 3 is the band from 2000000 (row 4 of the sheet), column 2 is column C, so INDEX returnsC4. C4holds 45, the sample size: 45 items to test for a population of 3,400,0003.400.000 at medium risk.- Change
G2to 10000000 and the first MATCH returns 4 (an exact hit on a band start), giving 55. ChangeG1to High and the second MATCH returns 3.
Watch out: If the population bands are not sorted ascending, match_type 1 returns a wrong row without any error, and the working paper shows a sample size from another band.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
The two MATCH functions use different match types because the two questions differ: the population value needs 'which band', the risk level needs 'which exact column'. INDEX only combines two position numbers, so each direction can use whatever search logic suits it. All three ranges start at the same corner, so the positions line up.
More to watch out for
- Leave out the 0 in the risk MATCH and it searches the headers as if they were sorted. Depending on the labels, it may still find the right column today and the wrong one after a level is renamed or added.
- A population value below 0 is under the first band and returns #N/A, for example a net credit balance.
Variations
=INDEX(B2:D5,XMATCH(G2, A2:A5, -1), XMATCH(G1, B1:D1))
=INDEX(B2:D5;XMATCH(G2; A2:A5; -1); XMATCH(G1; B1:D1))
With XMATCH, match_mode -1 means exact or next smaller and does not require sorted data; exact match is the default for the risk level.
=XLOOKUP(G2,A2:A5, XLOOKUP(G1, B1:D1, B2:D5), , -1)
=XLOOKUP(G2;A2:A5; XLOOKUP(G1; B1:D1; B2:D5); ; -1)
Nested XLOOKUP does the same in Excel 2021 and later: the inner one picks the risk column, the outer one the band.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
First journal line above performance materiality
In journal entry testing you go through the lines in entry order and want the first entry whose amount exceeds performance materiality, because that is where you start your inspection. MATCH normally searches for a value, but here the question is 'where does a condition first become true?'.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Journal | Amount | Performance materiality | 4000040000 | ||
| 2 | 25-0951 | VRK | €18,450.00€ 18.450,00 | First entry above it | 25-0974=LET( amount, C2:C9, limit, F1, pos, MATCH(TRUE, amount > limit, 0), IFNA(INDEX(A2:A9, pos), "No entry above the limit") )=LET( amount; C2:C9; limit; F1; pos; MATCH(TRUE; amount > limit; 0); IFNA(INDEX(A2:A9; pos); "No entry above the limit") ) | ||
| 3 | 25-0958 | INK | €7,200.00€ 7.200,00 | ||||
| 4 | 25-0962 | MEM | €31,000.00€ 31.000,00 | ||||
| 5 | 25-0967 | BNK | €3,100.00€ 3.100,00 | ||||
| 6 | 25-0971 | VRK | €9,800.00€ 9.800,00 | ||||
| 7 | 25-0974 | MEM | €41,500.00€ 41.500,00 | ||||
| 8 | 25-0980 | INK | €2,750.00€ 2.750,00 | ||||
| 9 | 25-0983 | BNK | €52,000.00€ 52.000,00 | ||||
| 10 |
Swipe sideways to see all columns
Formula in F2
=LET( amount,C2:C9, limit, F1, pos, MATCH(TRUE, amount > limit, 0), IFNA(INDEX(A2:A9, pos), "No entry above the limit") )
=LET( amount;C2:C9; limit; F1; pos; MATCH(TRUE; amount > limit; 0); IFNA(INDEX(A2:A9; pos); "No entry above the limit") )
Result: 25-0974
Step by step
- LET names the inputs: amount is
C2:C9and limit is 40000. - amount > limit compares every amount with 40000 and produces an array of eight logical values: 18450, 7200, 31000, 3100 and 9800 give FALSE; 41500 gives TRUE; 2750 gives FALSE; 52000 gives TRUE. The array is {FALSE; FALSE; FALSE; FALSE; FALSE; TRUE; FALSE; TRUE}.
- MATCH looks for TRUE in that array with match_type 0. The first TRUE is in position 6, so pos is 6.
- INDEX returns the sixth cell of
A2:A9, which isA7: entry25-0974. IFNA lets the entry number through because it is not an error. - Raise
F1to 45000 and pos becomes 8, entry25-0983, because 41500 is no longer above the limit. - Raise
F1to 60000. No amount is above 60000, the array holds only FALSE, MATCH returns #N/A, INDEX passes the #N/A on, and IFNA shows No entry above the limit.
Watch out: The mirror-image mistake: leaving out the 0. MATCH then treats the array as sorted and searches by halving it. On a mix of FALSE and TRUE the position it returns is not reliably the first TRUE, so you may inspect the wrong entry without any error.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
MATCH does not care where its lookup_array comes from: a comparison that produces an array of TRUE and FALSE is a valid list to search, and the first TRUE marks the first line that meets the condition. LET keeps the condition readable and lets you change the rule in one place.
Do not use this construction when you have Excel 2021 or later and only need the entry number: XLOOKUP(TRUE, C2:C9 > F1, A2:A9, ...) does it in one function, at the cost of not working in older versions.
In Excel 2019 and older, this MATCH needs to be confirmed with Ctrl+Shift+Enter and LET is not available.
More to watch out for
- If the export holds an amount as text, for example 41.500 stored as a text string, Excel treats text as larger than any number, so that line is reported as the first one above the limit. Convert the column to numbers first.
- amount and the INDEX range must cover the same rows.
C2:C9againstA3:A10shifts every answer one entry.
Variations
=XLOOKUP(TRUE,C2:C9 > F1, A2:A9, "No entry above the limit")
=XLOOKUP(TRUE;C2:C9 > F1; A2:A9; "No entry above the limit")
Excel 2021 and later: XLOOKUP searches the TRUE/FALSE array directly and has its own if_not_found.
=MATCH(TRUE,C2:C9 > F1, 0)
=MATCH(TRUE;C2:C9 > F1; 0)
Only the position of the line within the export (6), for example to jump to it with a hyperlink.
Mode explorer
Type a value and pick a match type, and see which position MATCH returns on a list sorted low to high.
Match type
Largest value that is not above the lookup value; the list must run low to high.
Only an exact match counts; the order of the list does not matter.
Smallest value that is not below the lookup value; the list must run high to low.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Days overdue from | Band | Position | |
| 2 | 00 | 0 to 30 days | 22=MATCH("x", $A$2:$A$7, 1)=MATCH("x"; $A$2:$A$7; 1) | |
| 3 | 3131 | 31 to 60 days | ||
| 4 | 6161 | 61 to 90 days | ||
| 5 | 9191 | 91 to 120 days | ||
| 6 | 121121 | 121 to 180 days | ||
| 7 | 181181 | Over 180 days |
Swipe sideways to see all columns
- Formula cell
- Where the search lands
=MATCH(47, $A$2:$A$7, 1)
=MATCH(47; $A$2:$A$7; 1)
Result: 22
47 is not in the list. Type 1 takes the largest value not above it, 31, at position 2.
=MATCH(47, $A$2:$A$7, 0)
=MATCH(47; $A$2:$A$7; 0)
Result: #N/A
47 is not in the list, so an exact match finds nothing.
=MATCH(47, $A$2:$A$7, -1)
=MATCH(47; $A$2:$A$7; -1)
Result: 66
Type -1 expects a list that runs high to low. This list runs low to high, so position 6 means nothing.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Wrong row found in an unsorted list | match_type is left out of a lookup on an unsorted list. | Add 0 as the third argument for every exact lookup. |
| Position is off from the sheet row | The position is used as a row number on the sheet. MATCH returns 4 for a value in A5 when the range starts at A2. | Feed the position to INDEX with a range that starts in the same row as lookup_array. |
| #N/A with a wildcard | A wildcard such as "Ber*" returns #N/A, because match_type is 1 or the range holds numbers. | Wildcards work only with match_type 0 and only on text cells. |
| #N/A or nonsense with match_type -1 | match_type -1 is used on data sorted ascending, and the result is #N/A or nonsense. | -1 needs descending data. For ascending bands use 1. |
Used in combinations
- Find the customer from a bank descriptionCut the invoice number out of a bank statement description with TEXTAFTER and TEXTBEFORE, then look up the customer in the receivables list with XLOOKUP.Excel 2024 or later (This combination needs Excel 2024 or later)
- Invoices missing from the ledger with FILTER, ISNA and XMATCHList the invoices on the receivables specification that are not in the general ledger: XMATCH looks each one up, ISNA turns every miss into TRUE, and FILTER keeps those rows, with a message when nothing is missing.Excel 2021 or later (This combination needs Excel 2021 or later)
- 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)