FormulaCraft

Fix the VLOOKUP error

Excel & Google Sheets
Topic:VLOOKUP

What VLOOKUP means

When someone says VLOOKUP 'is not working', the formula is either returning an error (#N/A, #VALUE!, #REF!), returning a wrong result, or the cell is displaying the formula text instead of a result. Each symptom has a different root cause and requires a different fix.

Common causes

Example fix

Broken
=VLOOKUP(A2,$D$2:$F$100,5,0)
Fixed
=VLOOKUP(A2,$D$2:$F$100,2,0)

The table range D:F has only 3 columns, so col_index_num 5 caused #REF!. Corrected to 2 to return the second column.

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How to fix it

  1. 1If the cell shows formula text: check the cell format (Home > Format Cells in Excel, Format menu in Sheets) and switch it from Text to General, then re-enter the formula.
  2. 2Fix #REF!: count the columns in your table_array. If table_array is D:F that is 3 columns — col_index_num cannot exceed 3.
  3. 3Fix #VALUE!: make sure col_index_num is a positive whole number (1 or greater). Check that no surrounding formula is accidentally passing text into that argument.
  4. 4Fix syntax errors: the correct signature is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). Use the formula builder / function tooltip to verify each argument.
  5. 5If the named range or sheet reference is broken, redefine the named range (Formulas > Name Manager in Excel) or correct the sheet tab name in the reference.

Got the same error in multiple cells? Upload your whole sheet and the Auditor will flag every VLOOKUP and broken formula at once — free. Pro plans (₹199/$4.99/mo) can apply the verified fixes and download the corrected file in one click.

Frequently asked

VLOOKUP worked yesterday and broke today without me changing anything — what happened?

Someone likely inserted or deleted a column inside table_array, shifting all column positions. The col_index_num no longer points to the right column. Audit the source table and update the index, or switch to XLOOKUP/INDEX+MATCH.

Can VLOOKUP look to the left?

No. VLOOKUP can only return values from columns to the right of the search column. To look left, use INDEX/MATCH or XLOOKUP, which have no such restriction.

Is there a modern replacement for VLOOKUP?

Yes. XLOOKUP is available in Excel 365 and Google Sheets and handles left-lookups, multiple return columns, and custom not-found values natively. INDEX/MATCH is a universally available alternative with similar flexibility.

More on VLOOKUP

See all →

Related formulas

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: