#REF! error: what it means and how to fix it

The formula refers to a cell that does not exist: it was deleted, or the formula reaches outside the range it was given.

The usual causes

How to fix it

  1. Undo the deletion if you just made it, then delete the data rather than the row.
  2. Count the columns in the VLOOKUP range: in A2:B4 the price is column 2, not 3.
  3. Look inside the formula for the text #REF! and replace it with the right cell.

Fix a broken formula live

The table A2:B4 has only two columns. Cell E2 shows #REF!. Change the formula in the bar until the error goes away, or press “Show the fix”.

ABCDEF
1
2
3
4
5
6
7
8

#REF! The column number 3 is past the edge of the 2-column table.

How to fix #REF! →

Uses VLOOKUP. Start with the free spreadsheet lessons →

Runs in your browser; nothing you type is sent anywhere. Works like Excel, Google Sheets and LibreOffice Calc for the common functions.

Learn the skill behind it

Practice cell references in the free formula lesson →

Find a row with VLOOKUP in the Pro lesson →

Other spreadsheet errors