ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Lookups
  3. INDEX Function in Excel: Return a Value by Position

INDEX Function in Excel: Return a Value by Position

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

The INDEX function returns the value at a given position in a range. Write =INDEX(array, row_num, [column_num]): =INDEX(B2:B6,3) returns the third value in B2:B6, and =INDEX(A2:D6,4,3) returns the value in the fourth row and third column. Positions count from the top-left of the range. Combine INDEX with MATCH to find the position automatically.

Key takeaways

  • INDEX returns a value by position: =INDEX(array, row_num, [column_num]).
  • Row and column numbers count from the top-left cell of the range, not from row 1 of the sheet.
  • For a single row or column, one number is enough: =INDEX(B2:B6,3).
  • A row or column number of 0 returns the whole column or row, which you can feed into SUM.
  • A position outside the range returns #REF!.
On this page+
  1. What does the INDEX function do?
  2. INDEX with one row or column
  3. INDEX with a row and a column
  4. How to use INDEX with MATCH
  5. Return a whole column or row with 0
  6. INDEX can also build a range
  7. Why does INDEX return #REF!?
  8. INDEX compared with VLOOKUP and XLOOKUP
  9. Practise it

The INDEX function in Excel returns the value at a position you choose: the third item in a list, or the cell where row 4 meets column 3 of a table. It is simple on its own and becomes one of the most useful lookup tools when you pair it with MATCH. This guide explains the syntax, shows one-way and two-way examples, and covers the tricks and errors you will meet in real sheets and job tests.

What does the INDEX function do?#

INDEX takes a range and one or two position numbers, and returns the value at that position. Think of it as "go to row 3, column 2 of this block and tell me what's there". The syntax is:

Excel formula
=INDEX(array, row_num, [column_num])
PartWhat it means
arrayThe range to pick from, such as A2:D6
row_numWhich row of the range, counting the first row as 1
column_numOptional: which column of the range, counting the first column as 1

INDEX works in every version of Excel. All the examples below use this sales table in A1:D6:

ABCD
1MonthNorthSouthWest
2Jan12,0009,5008,700
3Feb13,50010,2009,100
4Mar11,80011,0009,900
5Apr14,20010,80010,400
6May15,10011,90010,100

INDEX with one row or column#

When the range is a single column or a single row, you only need one number. To get the third value from the North column:

Excel formula
=INDEX(B2:B6,3)

The result is 11,800, the March figure. The count starts at B2, the first cell of the range, so B2 is 1, B3 is 2 and B4 is 3. It does not matter that B4 is row 4 of the sheet.

For a single row, the one number counts across. =INDEX(B3:D3,2) returns 10,200, the second value in the February row.

INDEX with a row and a column#

For a table with several rows and columns, give both a row number and a column number. To find South sales in April:

Excel formula
=INDEX(A2:D6,4,3)

Row 4 of A2:D6 is April, and column 3 is South, so the result is 10,800. Count the columns from the first column of the range: Month is 1, North is 2, South is 3.

Excel counts the same way in every lookup function, from the top-left cell of the range you select. Getting this count wrong by one is the most common INDEX mistake.

How to use INDEX with MATCH#

Typing position numbers by hand is fine for one-off checks, but real lookups need the position found for you. That is what MATCH does: it returns the position of a value in a list.

Excel formula
=INDEX(B2:D6,MATCH("Apr",A2:A6,0),MATCH("West",B1:D1,0))

MATCH("Apr",A2:A6,0) returns 4, and MATCH("West",B1:D1,0) returns 3. INDEX then returns the value in row 4, column 3 of B2:D6, which is 10,400. The 0 in MATCH means exact match.

Notice that the INDEX range starts in column B, so the column MATCH must search B1:D1, starting in the same column. The full method is in the INDEX MATCH beginner's guide. It can also look up with several conditions at once, as shown in lookups with multiple criteria.

Return a whole column or row with 0#

A row number of 0 tells INDEX to return every row, which means the whole column. A column number of 0 returns the whole row. This is handy inside SUM or AVERAGE:

Excel formula
=SUM(INDEX(B2:D6,0,2))

This returns the whole second column, South, and adds it up: 9,500 + 10,200 + 11,000 + 10,800 + 11,900 = 53,400. Replace the 2 with a MATCH on the header and the same formula totals whichever region you pick.

In Microsoft 365 and Excel 2021, =INDEX(B2:D6,0,2) on its own spills the five values into the cells below. In older versions it shows only one value, so wrap it in a function like SUM.

INDEX can also build a range#

INDEX returns a cell reference, not just a value, so you can use it as one end of a range. To total sales from January up to March:

Excel formula
=SUM(B2:INDEX(B2:B6,3))

INDEX(B2:B6,3) points at B4, so the formula becomes SUM(B2:B4): 12,000 + 13,500 + 11,800 = 37,300. Change 3 to a cell where the user types a month number and you have a running year-to-date total.

The same idea finds the last value in a list with no gaps: =INDEX(B2:B6,COUNTA(B2:B6)) returns 15,100, the May figure, and keeps working as you add months.

Why does INDEX return #REF!?#

INDEX returns #REF! when you ask for a position outside the range. In the table above:

FormulaResultWhy
=INDEX(B2:B6,6)#REF!The range has only 5 rows
=INDEX(A2:D6,2,5)#REF!The range has only 4 columns
=INDEX(A2:D6,2,2)13,500Row 2 is Feb, column 2 is North

If the numbers come from MATCH, a #N/A usually means MATCH couldn't find the value, so INDEX never got a position. The guide on INDEX MATCH not working walks through those cases.

INDEX compared with VLOOKUP and XLOOKUP#

INDEX on its own needs a position, while VLOOKUP and XLOOKUP search for a value. With MATCH added, INDEX can look in any direction and doesn't break when someone inserts a column. That is why many analysts prefer it. For a direct comparison, see VLOOKUP vs INDEX MATCH and INDEX MATCH vs XLOOKUP. The INDEX function guide has a quick syntax reference.

Practise it#

INDEX is easiest to learn by counting positions on a real table. Practise INDEX and MATCH in a live spreadsheet: you type the formula, it checks the position and the result instantly, and then you build the full two-way lookup. Or start with the exercise on this page.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

What were South sales in April? April is the 4th row of A2:D6 and South is the 3rd column. In F2, use INDEX with both numbers.

fx
ABCDEFG
1
Month
North
South
West
Apr South
2
Jan
12000
9500
8700
3
Feb
13500
10200
9100
4
Mar
11800
11000
9900
5
Apr
14200
10800
10400
6
May
15100
11900
10100
7
8
9

Tip: INDEX needs the range, then the row number, then the column number: A2:D6, 4, 3.

Practise this in a lesson

LessonINDEX and MATCHCombine INDEX and MATCH to look up in any direction, including returning a column to the left of the one you search.Function guideINDEXLearn the Excel INDEX function: return a value by row and column position, build two-way lookups with MATCH, and practice live.

Frequently asked questions

What does the INDEX function do in Excel?

+

It returns the value at a given position in a range. You give it the range, a row number and, for a table, a column number, and it returns what is in that cell.

What is the difference between INDEX and MATCH?

+

INDEX takes a position and returns a value. MATCH does the opposite: it takes a value and returns its position. Together, MATCH finds the row and INDEX returns the value from it.

Why does INDEX return #REF!?

+

The row or column number is larger than the range. For example, =INDEX(B2:B6,6) asks for the sixth value of a five-cell range. Check the size of the range and the number.

Does INDEX work in all versions of Excel?

+

Yes. INDEX works in every version of Excel. Returning a whole row or column so it spills into several cells needs Microsoft 365 or Excel 2021, but using it inside SUM works everywhere.

Sources

  • INDEX function - Microsoft Support
  • MATCH function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the INDEX function do?
  2. INDEX with one row or column
  3. INDEX with a row and a column
  4. How to use INDEX with MATCH
  5. Return a whole column or row with 0
  6. INDEX can also build a range
  7. Why does INDEX return #REF!?
  8. INDEX compared with VLOOKUP and XLOOKUP
  9. Practise it

Keep reading

Lookups· 6 min read

INDEX MATCH in Excel: The Beginner's Guide

INDEX MATCH is a lookup built from two functions. MATCH finds the position of a value in one column, and INDEX returns the item at that position from another column: =INDEX(A2:A9,MATCH(G2,B2:B9,0)). It can look left, it keeps working when columns are inserted, and it runs in every version of Excel.

Comparisons· 7 min read

INDEX MATCH vs XLOOKUP: Is INDEX MATCH Still Worth Learning?

Yes, INDEX MATCH is still worth learning. XLOOKUP is shorter and has a built-in "not found" message, so use it for new files when everyone has Excel 2021, Excel 2024 or Microsoft 365. INDEX MATCH works in every version, appears in many existing workbooks, and still comes up in interviews.

Comparisons· 7 min read

VLOOKUP vs INDEX MATCH: Differences and When to Use Each

Use VLOOKUP for quick lookups to the right in a table that won't change shape. Use INDEX MATCH when you need to look left, when columns may be inserted, or when you want a two-way lookup. Both work in every version of Excel, so INDEX MATCH is the flexible choice when XLOOKUP isn't available.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free