Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How INDEX Works in Excel: A Step-by-Step Guide

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The INDEX function in Excel returns a value (or an entire row or column of values) from inside a range, based on a row number and, optionally, a column number you supply. You tell it where to look and which position you want, and it hands back the cell at that position. The simplest form is =INDEX(A1:C10,3,2), which returns whatever sits in the third row and second column of that range. Excel is already installed and you have a blank worksheet or an existing table to work on; nothing else is required.

What You'll Need

  • Microsoft Excel on desktop (Windows or Mac), Excel for the web, or the mobile app.
  • A worksheet or table with data you can point the formula at.
  • A basic feel for cell references such as A1:C10. That is all.

Step-by-Step

  1. Understand the syntax. INDEX has two flavours: INDEX(array, row_num, [column_num]) for a single range, and the reference form INDEX(reference, row_num, [column_num], [area_num]) when you point at several separate ranges. In practice you will almost always use the first. Square brackets mean optional, so column_num can be left out when your range is a single column or row.
  2. Pick a clear range. Click an empty cell and type =INDEX(. Then select the block of data you want to search, for example B2:D20. Press F4 to make it absolute ($B$2:$D$20) if you plan to copy the formula down. Absolute references stop the range drifting as the formula moves.
  3. Add a comma and the row number. Count positions inside your range, not worksheet row numbers. If your range starts at row 2, then row number 1 inside INDEX means the first row of the range, which is worksheet row 2. Type the number, e.g. =INDEX($B$2:$D$20, 5. This currently returns the whole fifth row of the range.
  4. Add a comma and the column number. Still counting inside the range, so column 1 is the leftmost column of the range. Close the bracket: =INDEX($B$2:$D$20, 5, 3). Press Enter. The cell shows the value at that intersection.
  5. Try the one-dimensional shortcut. If the range is a single column such as A2:A50, you only need a row number: =INDEX(A2:A50, 10) returns the tenth value down. A single row works the same way with just a column number.
  6. Feed the row or column number from another cell. Instead of hardcoding, put the position in a cell, say F1, and write =INDEX(A2:A50, F1). Change F1 and the result updates. This is how INDEX becomes a lookup tool rather than a fixed reference.
  7. Return a whole row or column. Use 0 in place of the position you want to ignore. =INDEX(A2:D50, 0, 3) returns the entire third column of the range. In older versions this spills only if your version supports dynamic arrays; otherwise enter it as an array formula by pressing Ctrl+Shift+Enter, which wraps it in braces automatically.
  8. Pair INDEX with MATCH for a real lookup. MATCH finds a position, and INDEX uses it. Put a search term in G1, then write =INDEX(C2:C50, MATCH(G1, A2:A50, 0)). MATCH looks for G1's exact value in A2:A50 and returns its position, and INDEX hands back the matching value from column C. Use a 0 as MATCH's third argument for an exact match, which is what you want almost every time.
  9. Build a two-way lookup. With a header row and a header column, use two MATCH functions: =INDEX(B2:E50, MATCH(G1, A2:A50, 0), MATCH(G2, B1:E1, 0)). One matches the row label, the other the column label, and INDEX returns the value where they cross.
  10. Wrap it in IFERROR for clean output. =IFERROR(INDEX(C2:C50, MATCH(G1, A2:A50, 0)), "Not found") shows a friendly message instead of #N/A when a search term is missing.
  11. Copy and test. Drag the fill handle down and check that each result matches what you expect. Change a value in the source data and confirm the formula updates. When something looks wrong, click the cell and use Formulas > Evaluate Formula to step through it one calculation at a time.

Menu names and keyboard shortcuts can differ slightly between Excel versions, platforms and regions, so if a label is not exactly where you expect, look for the nearest equivalent.

Common Mistakes

  • Confusing position with worksheet row number. INDEX counts from the first row of the range, not from row 1 of the sheet. A range starting at row 5 makes INDEX row 1 equal to worksheet row 5.
  • Relative references when copying. Without dollar signs, A2:A50 turns into A3:A51 one row down and silently returns wrong data.
  • Using 1 instead of 0 in MATCH. The third argument 1 assumes sorted data and does an approximate match; on unsorted data it returns garbage. Use 0 for exact matches.
  • Forgetting column_num when the range has several columns. Omit it and INDEX returns a whole row, which can spill into other cells or produce an unexpected array.
  • Assuming VLOOKUP-style rules. INDEX and MATCH can look to the left of the key column, which VLOOKUP cannot. That is a feature, not a bug, but it surprises people who expect the restriction.
  • Mismatched range sizes. MATCH's lookup range and INDEX's result range must be the same height (or width), or positions will not line up.

Tips

  • Convert your source data to an Excel Table (Insert > Table). Structured references like Table1[Price] auto-expand and remove most range errors.
  • Name your ranges with Formulas > Define Name, then write =INDEX(PriceList, MATCH(G1, SKUs, 0)) for formulas that read almost like sentences.
  • INDEX is not volatile, so it recalculates only when its inputs change. On large workbooks it is often lighter than a full-column lookup.
  • Use INDEX alone to grab a value by position when you have no key column to match against, such as picking the fifth item from a fixed list.
  • Keep the 0 in MATCH and get into the habit of wrapping lookups in IFERROR; together these two habits eliminate most visible lookup errors.

Troubleshooting

Result is #REF! The row or column number points outside the range. Check you are counting from the range's first cell and that the number is not larger than the range's height or width.

Result is #N/A. In a MATCH pairing this usually means the value genuinely is not there. Check for trailing spaces, numbers stored as text, or the approximate-vs-exact argument. A quick test is =G1=A2; if it returns FALSE when the values look identical, the types differ.

Result is #VALUE! A row or column number is text rather than a number, often because a referenced cell contains "5" in quotes or a stray space.

The formula returns a whole row you did not want. Add the column number or a 0 deliberately, and check whether your version treats the output as a spilled array.

Results shift after sorting. INDEX works on positions, so sorting changes what each position holds. If you need values to stay attached to their rows, use a Table or match on a unique key rather than a raw position.

If nothing resolves it, retype the formula rather than editing, confirm the range with the mouse, and use Evaluate Formula to watch each part calculate.

Frequently Asked Questions

What is the difference between INDEX and VLOOKUP?

VLOOKUP searches a key column and returns a column to its right. INDEX takes a position and returns whatever is there, and when paired with MATCH it can look left or right of the key and is generally more flexible.

Can INDEX return more than one cell?

Yes. Use 0 for row_num or column_num to return a whole column or row, and in versions with dynamic arrays the results spill automatically.

Does INDEX work in Excel for the web and mobile?

Yes, the function is the same. Keyboard shortcuts such as F4 for absolute references may not be available on every mobile keyboard, so type the dollar signs by hand there.

Why does my INDEX formula need Ctrl+Shift+Enter?

Older Excel versions require it when a formula returns an array. Versions with dynamic arrays handle it automatically, so you only need the shortcut on legacy setups.

Can I use INDEX across another sheet or workbook?

Yes. Reference the sheet in the range, for example Sheet2!$A$1:$C$20, and include the workbook name in brackets if it is a different file that is open.