Available in:All versions; a 0 for row_num or column_num spills in Excel 2021 and Microsoft 365 (Works in Excel 2007, every later version, Microsoft 365 and Excel for the web)Examples need Excel 2021 or laterCategory:Lookup & reference

INDEX

INDEX in Dutch Excel

Returns the cell at a given row and column number inside a range, or a whole row or column of it when one number is 0.

Difficulty rating 3 of 5. Picking a cell by row and column is simple, but INDEX earns its place combined with XMATCH, and its habit of returning a reference rather than a value takes a while to exploit.

Last updated: 13 October 2026

See the worked examples

Sheet excerpt: H3 holds the formula
RowABCDEFGH
1Relation0-30 days31-60 days61-90 days90+ daysCust. row33
2D1001€18,450.00€ 18.450,00€6,200.00€ 6.200,00€0.00€ 0,00€1,250.00€ 1.250,00Bucket44
3D1002€9,800.00€ 9.800,00€14,350.00€ 14.350,00€4,200.00€ 4.200,00€0.00€ 0,00Amount€8,900.00€ 8.900,00=INDEX(B2:E5, H1, H2)=INDEX(B2:E5; H1; H2)
4D1003€22,100.00€ 22.100,00€0.00€ 0,00€3,750.00€ 3.750,00€8,900.00€ 8.900,00
5D1004€5,400.00€ 5.400,00€2,150.00€ 2.150,00€0.00€ 0,00€600.00€ 600,00
Formula cell (H3)Input

Result: €8,900.00€ 8.900,00

=INDEX(B2:E5, H1, H2)
=INDEX(B2:E5; H1; H2)

What INDEX does and when to use it

What it does: it returns what sits at a given row and column number in a range, for example one aging bucket of a receivables list.

When to use it: to read a cell by position, to hand a whole row or column to SUM, or together with XMATCH or MATCH to look up by row and column label. For a lookup on one key that returns one column, XLOOKUP is shorter.

How Excel evaluates it

Excel first settles which block to use: array itself, or the area chosen by area_num. It then counts row_num rows down and column_num columns across from the top-left cell of that block. A 0 in one of them means 'all', so the result is a whole column or row.

If a number is outside the block, the result is #REF!. What comes back is a reference to the cell or range, which Excel shows as its value in a cell but which other functions and the : operator can use as a range.

Watch out: Row and column numbers count from the top-left cell of the block, not from the sheet: in B2:D5, row 1 is sheet row 2.

Mental model

A seat in a theater: row 3, seat 2 is one exact place, counted from the front-left corner of the section you are in, not of the building.

Terms used on this page: operator, reference, array, range, cell

INDEX(array, row_num, [column_num], [area_num])
INDEX(array; row_num; [column_num]; [area_num])
Arguments
ArgumentTypeMeaningDefault
arrayRequiredThe block of cells to pick from. Numbering starts at its top-left cell.
row_numRequiredWhich row of the block, counted from 1. Use 0 for every row.
column_numOptionalWhich column of the block, counted from 1. Use 0 for every column.
area_numOptionalWith several ranges in brackets: which one to use, counted from 1.1

Return value:The value or reference at the given row and column

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

Pick one aging bucket from the receivables list

Veldhuis Installatie BV sent you its receivables aging list (ouderdomsanalyse debiteuren) at 31 December 2025: four customers down the side, four aging buckets across. For the follow-up of confirmations you want a cell that shows the open amount once you type the row number of the customer and the number of the bucket.

Sheet excerpt: H3 holds the formula
RowABCDEFGHI
1Relation0-30 days31-60 days61-90 days90+ daysCust. row33
2D1001€18,450.00€ 18.450,00€6,200.00€ 6.200,00€0.00€ 0,00€1,250.00€ 1.250,00Bucket44
3D1002€9,800.00€ 9.800,00€14,350.00€ 14.350,00€4,200.00€ 4.200,00€0.00€ 0,00Amount€8,900.00€ 8.900,00=INDEX(B2:E5, H1, H2)=INDEX(B2:E5; H1; H2)
4D1003€22,100.00€ 22.100,00€0.00€ 0,00€3,750.00€ 3.750,00€8,900.00€ 8.900,00
5D1004€5,400.00€ 5.400,00€2,150.00€ 2.150,00€0.00€ 0,00€600.00€ 600,00
6
Formula cell (H3)Input

Formula in H3

=INDEX(B2:E5, H1, H2)
=INDEX(B2:E5; H1; H2)

Result: €8,900.00€ 8.900,00

Step by step
  1. Excel reads array: B2:E5, a block of 4 rows and 4 columns. Its top-left cell, B2, is row 1, column 1. The relation codes in column A are not part of the block.
  2. row_num is H1, which holds 3. Counting down from B2:

    • row 1 is sheet row 2 (D1001)
    • row 2 is sheet row 3 (D1002)
    • row 3 is sheet row 4 (D1003)
  3. column_num is H2, which holds 4. Counting across from B: column 1 is B, 2 is C, 3 is D, 4 is E, the bucket over 90 days.
  4. Row 4 and column E meet in E4, and INDEX returns its value: 8900. That is the amount of D1003 that is more than 90 days overdue.
  5. Change H1 to 2 and H2 to 3 and the result is 4200, from D3. Type 5 in H1 and you get #REF!, because the block has only 4 rows.

Watch out: If someone inserts a customer between two existing rows, for example between D1002 and D1003, Excel widens B2:E5 to B2:E6 and row number 3 now points at the new customer. Your working paper still says row 3, and INDEX returns another customer's amount without any warning.

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

Why it works

INDEX does no searching at all; it counts. The row and column numbers are positions inside the block, so the aging list can sit anywhere on the sheet and the same numbers still point at the same open amount.

Watch out for

  • If someone inserts a customer between two existing rows, for example between D1002 and D1003, Excel widens B2:E5 to B2:E6 and row number 3 now points at the new customer. Your working paper still says row 3, and INDEX returns another customer's amount without any warning.

    The same happens when the client re-sorts the list. A row inserted above the first customer does not cause this, because the whole range moves down with it.

Intermediate

Total one quarter chosen by number

From the general ledger you summarised five cost accounts (4000, 4500, 4600, 4700, 4800) with a column per quarter of 2025. You type a quarter number in H1 and want the ledger total for that quarter in H2, to reconcile it to the client's specification. The rent invoice for the third quarter was never booked, so that cell in account 4500 is empty.

Sheet excerpt: H2 holds the formula
RowABCDEFGHI
1AccountQ1Q2Q3Q4Quarter33
240004000€184,000.00€ 184.000,00€186,500.00€ 186.500,00€185,200.00€ 185.200,00€201,300.00€ 201.300,00Ledger total€211,100.00€ 211.100,00=SUM(INDEX(B2:E6, 0, H1))=SUM(INDEX(B2:E6; 0; H1))
345004500€36,000.00€ 36.000,00€36,000.00€ 36.000,00€36,000.00€ 36.000,00
446004600€12,400.00€ 12.400,00€13,850.00€ 13.850,00€11,200.00€ 11.200,00€14,900.00€ 14.900,00
547004700€8,300.00€ 8.300,00€7,950.00€ 7.950,00€8,600.00€ 8.600,00€9,100.00€ 9.100,00
648004800€5,200.00€ 5.200,00€0.00€ 0,00€6,100.00€ 6.100,00€4,800.00€ 4.800,00
7
Formula cell (H2)Input

Formula in H2

=SUM(INDEX(B2:E6, 0, H1))
=SUM(INDEX(B2:E6; 0; H1))

Result: €211,100.00€ 211.100,00

Step by step
  1. Excel evaluates INDEX first. row_num is 0, which means every row of B2:E6. column_num is H1, which holds 3, the third column of the block: D.
  2. INDEX returns the whole column D2:D6: 185200, an empty cell, 11200, 8600 and 6100.
  3. SUM adds the numbers and skips the empty cell of account 4500: 185200 + 11200 = 196400, + 8600 = 205000, + 6100 = 211100.
  4. If the client's specification shows 247100 for the third quarter, the difference is 247100 - 211100 = 36000: exactly one quarter of rent. That is the unbooked invoice.
  5. Compare leaving out the 0: SUM(INDEX(B2:E6, H1)). With only one number on a four-column block, INDEX returns the whole row 3, account 4600, and SUM gives 12400 + 13850 + 11200 + 14900 = 52350. Plausible, and the answer to a different question.
  6. Change H1 to 1 and the total becomes 184000 + 36000 + 12400 + 8300 + 5200 = 245900.

Watch out: SUM treats the empty cell and a 0 the same, but AVERAGE does not: AVERAGE(INDEX(B2:E6, 0, 3)) is 211100 / 4 = 52775, and with a 0 in D3 it would be 211100 / 5 = 42220. Decide whether a missing booking means zero before you average.

More on this example: why it works, 1 variation

Why it works

A 0 in row_num tells INDEX not to choose a row, so it hands over the entire column that column_num selects. SUM accepts that column as a range, which turns one input cell into a switch between four quarterly totals.

Variations

=SUM(INDEX(B2:E6, 2, 0))
=SUM(INDEX(B2:E6; 2; 0))

A 0 for column_num returns a whole row instead: the rent booked in 2025, 36000 + 36000 + 36000 = 108000, with the third quarter missing.

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

Intercompany balance per entity pair, found by label

The group controller sent an intercompany matrix: Dutch entities down the side, four counterparties across the top, with the balance receivable in each cell. You type an entity code and a counterparty code and want the balance to agree with the confirmation of the counterparty. Two codes (NL-4510 and NL-4501) differ only in the order of their digits, and the lookup must not mix them up.

Sheet excerpt: H3 holds the formula
RowABCDEFGHI
1EntityBE-01DE-02FR-03UK-04EntityNL-4501
2NL-4410€125,000.00€ 125.000,00€48,000.00€ 48.000,00€0.00€ 0,00€80,000.00€ 80.000,00CounterpartyFR-03
3NL-4415€60,000.00€ 60.000,00€110,500.00€ 110.500,00€25,000.00€ 25.000,00€0.00€ 0,00Balance€95,500.00€ 95.500,00=INDEX(B2:E6, XMATCH(H1, A2:A6), XMATCH(H2, B1:E1))=INDEX(B2:E6; XMATCH(H1; A2:A6); XMATCH(H2; B1:E1))
4NL-4510€200,000.00€ 200.000,00€180,000.00€ 180.000,00€150,000.00€ 150.000,00€175,000.00€ 175.000,00
5NL-4501€0.00€ 0,00€30,000.00€ 30.000,00€95,500.00€ 95.500,00€40,000.00€ 40.000,00
6NL-4551€15,000.00€ 15.000,00€0.00€ 0,00€60,000.00€ 60.000,00€22,500.00€ 22.500,00
7
Formula cell (H3)Input

Formula in H3

=INDEX(B2:E6, XMATCH(H1, A2:A6), XMATCH(H2, B1:E1))
=INDEX(B2:E6; XMATCH(H1; A2:A6); XMATCH(H2; B1:E1))

Result: €95,500.00€ 95.500,00

Step by step
  1. Excel evaluates the first XMATCH: it looks for H1, NL-4501, in A2:A6:

    • NL-4410: no
    • NL-4415: no
    • NL-4510: no (same digits, different order)
    • NL-4501: yes

    It returns the position 4.

  2. The second XMATCH looks for H2, FR-03, in the header row B1:E1: BE-01, DE-02, FR-03. It returns the position 3.
  3. INDEX now evaluates INDEX(B2:E6, 4, 3): the fourth row of the block is sheet row 5, the third column is D. It returns D5: 95500.
  4. The positions line up because A2:A6 starts on the same row as B2:E6, and B1:E1 starts in the same column. Each XMATCH counts in the same frame that INDEX counts in.
  5. Change H2 to UK-04 and the column position becomes 4, so the result is E5: 40000. Type a code that does not exist and XMATCH returns #N/A, which INDEX passes on.

Watch out: Search A1:A6 instead of A2:A6 and every position is one higher, because the header now counts as position 1. NL-4501 becomes 5, and INDEX quietly returns D6, the 60000 of NL-4551, which you would then compare with the wrong confirmation.

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

Why it works

XMATCH turns each label into a number, and INDEX turns two numbers into a cell. Splitting the job this way means the entity list and the counterparty row can be searched independently, and the lookup column may sit anywhere, even to the right of the data.

More to watch out for

  • In the older INDEX and MATCH version, leaving out MATCH's 0 switches to approximate match on codes that are not sorted. It can land on another entity and show its balance without any error.

Variations

=INDEX(B2:E6, MATCH(H1, A2:A6, 0), MATCH(H2, B1:E1, 0))
=INDEX(B2:E6; MATCH(H1; A2:A6; 0); MATCH(H2; B1:E1; 0))

The classic INDEX and MATCH, for Excel 2019 and earlier. The 0 in each MATCH is essential.

=XLOOKUP(H1, A2:A6, XLOOKUP(H2, B1:E1, B2:E6))
=XLOOKUP(H1; A2:A6; XLOOKUP(H2; B1:E1; B2:E6))

Nested XLOOKUP does the same in Excel 2021 or Microsoft 365 and accepts an if_not_found message; INDEX with XMATCH stays the better fit when you need the positions themselves.

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

Ledger versus specification for the periods tested

You reconcile revenue (account 8000) per period with the client's revenue specification. The ledger has postings up to period 6; the specification already runs through period 8.

The number of periods you have tested is typed in F1, and the difference must compare the same periods on both sides. The formula must not be volatile, because the XAF workbook is already slow.

Sheet excerpt: F2 holds the formula
RowABCDEFG
1PeriodLedger 8000SpecificationPeriods tested66
211€412,000.00€ 412.000,00€410,500.00€ 410.500,00Difference€11,500.00€ 11.500,00=LET( periods, F1, ledger, SUM(B2:INDEX(B2:B9, periods)), spec, SUM(C2:INDEX(C2:C9, periods)), ledger - spec )=LET( periods; F1; ledger; SUM(B2:INDEX(B2:B9; periods)); spec; SUM(C2:INDEX(C2:C9; periods)); ledger - spec )
322€389,000.00€ 389.000,00€389,000.00€ 389.000,00
433€446,500.00€ 446.500,00€446,500.00€ 446.500,00
544€471,000.00€ 471.000,00€468,000.00€ 468.000,00
655€458,000.00€ 458.000,00€458,000.00€ 458.000,00
766€502,300.00€ 502.300,00€495,300.00€ 495.300,00
877€380,000.00€ 380.000,00
988€390,000.00€ 390.000,00
10
Formula cell (F2)Input

Formula in F2

=LET(
  periods, F1,
  ledger, SUM(B2:INDEX(B2:B9, periods)),
  spec, SUM(C2:INDEX(C2:C9, periods)),
  ledger - spec
)
=LET(
  periods; F1;
  ledger; SUM(B2:INDEX(B2:B9; periods));
  spec; SUM(C2:INDEX(C2:C9; periods));
  ledger - spec
)

Result: €11,500.00€ 11.500,00

Step by step
  1. LET names the input: periods is F1, which holds 6.
  2. INDEX(B2:B9, 6) points at the sixth cell of B2:B9, which is B7. Because it sits next to the : operator, it hands over the reference B7, not the value 502300, so B2:INDEX(B2:B9, periods) becomes the range B2:B7.
  3. ledger is SUM(B2:B7): 412000 + 389000 = 801000, + 446500 = 1247500, + 471000 = 1718500, + 458000 = 2176500, + 502300 = 2678800.
  4. spec follows the same pattern on column C and becomes SUM(C2:C7): 410500 + 389000 = 799500, + 446500 = 1246000, + 468000 = 1714000, + 458000 = 2172000, + 495300 = 2667300.
  5. The last argument calculates ledger - spec = 2678800 - 2667300 = 11500: the ledger is higher than the specification, made up of 1500 in period 1, 3000 in period 4 and 7000 in period 6.

    A plain SUM(C2:C9) would take all eight periods of the specification, 3437300, and report 2678800 - 3437300 = -758500.

  6. Change F1 to 5 and both ranges shrink to row 6: ledger 2176500, specification 2172000, difference 4500.

Watch out: The mirror-image mistake is starting both ranges at the header: B1:INDEX(B1:B9, periods). The sixth cell is then B6, the header text is skipped by SUM, and you compare five periods with five periods, 2176500 - 2172000 = 4500. It looks right and reports the wrong period: the 7000 of period 6 is not in it.

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

Why it works

INDEX returns a reference, so it can serve as the end point of a range whose size follows an input cell. Unlike OFFSET, INDEX is not volatile: Excel recalculates it only when F1 or the data change, not on every edit anywhere in the workbook. LET keeps the period count in one place, so both ranges are always the same length.

Do not use this construction in Excel 2024 or Microsoft 365 when compatibility with older versions does not matter: SUM(TAKE(B2:B9, F1)) states the intent more plainly. The trade-off is that TAKE needs Excel 2024 or Microsoft 365, while B2:INDEX(...) works back to Excel 2007.

More to watch out for

  • If F1 is 0 or empty, INDEX(B2:B9, 0) returns the whole column and both sums cover all eight periods. Restrict F1 to whole numbers from 1 to 8 with data validation.

Variations

=SUM(TAKE(B2:B9, F1)) - SUM(TAKE(C2:C9, F1))
=SUM(TAKE(B2:B9; F1)) - SUM(TAKE(C2:C9; F1))

The Excel 2024 or Microsoft 365 way: TAKE keeps the first F1 rows. Shorter to read; not available in older versions.

=SUM(INDEX((B2:B9, C2:C9), 0, 1, 2))
=SUM(INDEX((B2:B9; C2:C9); 0; 1; 2))

The area form: the first argument lists two ranges, and area_num 2 picks C2:C9, so this totals the full specification, 3437300. Useful when a cell chooses between parallel tables.

Common mistakes

Common mistakes
SymptomCauseFix
The row below is returnedINDEX(B2:D5, 4, 2) was meant to read sheet row 4 and returns the row below.Sheet row 4 is row_num 3 in this block.
#REF! from INDEXINDEX returns #REF!.row_num or column_num is larger than the block. Check the size of array, or the position that MATCH or XMATCH passed in.
A plausible but wrong totalSUM(INDEX(B2:E6, 3)) was meant to total a column and gives a plausible but wrong number.Without column_num on a multi-column block, INDEX returns the whole row 3. For a column, write INDEX(B2:E6, 0, 3).
A value from the wrong row, no errorINDEX with MATCH returns a value from the wrong row, without any error.MATCH defaults to approximate match on sorted data. Add 0 as its third argument, or use XMATCH, which defaults to exact match.

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)
  • Random sample of journal lines with TAKE, SORTBY and RANDARRAYSelect n journal lines at random, never the same line twice: RANDARRAY gives every line a random key, SORTBY puts the lines in that order and TAKE keeps the first n.Excel 2024 or later (This combination needs Excel 2024 or later)
  • Systematic sample of invoices with a fixed startSelect every k-th invoice from a population: the interval comes from ROUNDDOWN and ROWS, SEQUENCE counts the picks from a fixed start typed in a cell, and INDEX lists the selected rows.Excel 2021 or later (This combination needs Excel 2021 or later)
  • Two-way lookup with one XLOOKUP and TOCOLFind the value where a row label and a column header meet, by turning both conditions into one grid of 0s and 1s and flattening it with TOCOL.Excel 2024 or later (This combination needs Excel 2024 or later)