logo
search
Formula Errors

How to Fix VLOOKUP #REF! Error with Correct Column Index in Excel

Tauseeq MagsiTauseeq Magsi Sep 28, 2026 870 views

Question details

The user needs to correct a VLOOKUP formula that is returning a #REF! error when searching for bid status data.

How to Fix Excel VLOOKUP #REF! Error by Correcting the Column Index
Product
Excel
Device & OS
not provided
Scenario
Searching for a matching bid status on another worksheet using a specific two-column lookup range.
Observed behavior
The formula evaluates to a #REF! error because the provided column index number exceeds the actual number of columns within the selected lookup array.
Before you start

Verify the exact column range you selected for your table_array argument. The column index must be counted starting from 1 within this specific range, not from column A of the entire worksheet.

Solution 1Recommended

Adjust the Column Index Number in the VLOOKUP Formula

Modify the third argument of your VLOOKUP formula to correctly reference the target column relative to your specific lookup range.

The #REF! error in VLOOKUP typically occurs when the column index number (col_index_num) is greater than the total number of columns in the defined table_array.

For instance, if your lookup range is G:H, it contains exactly two columns. Column G represents index 1, and Column H represents index 2. If you mistakenly enter 8 (assuming H is the 8th letter of the alphabet), Excel cannot find an 8th column in a 2-column range, resulting in a #REF! error.

1
Identify the Lookup Range

Check the second argument of your VLOOKUP formula (the table_array). In this scenario, it is 'Worksheet 2'!G:H, which consists of only 2 columns.

2
Count the Column Position

Count the columns starting from the first column of your selected range. Column G is 1, and Column H is 2.

3
Update the Formula

Select the cell with the error, click into the Formula Bar, and change the column index number to the correct relative position. Use `=VLOOKUP(B3, 'Worksheet 2'!G:H, 2, FALSE)` and press Enter.

Adjust the Column Index Number in the VLOOKUP Formula
Formula Fixed: The updated formula will now successfully retrieve the matching 'Won' or 'Lost' status without triggering the reference error.
Advanced Spreadsheet Software

Easily Manage Formulas and Fix Errors with WPS Spreadsheet

WPS Spreadsheet provides a highly compatible and intuitive environment for working with complex formulas like VLOOKUP. It helps you quickly identify formula errors and manage large datasets efficiently.

  1. 1. Open Your Workbook: Launch WPS Spreadsheet and open your existing .xlsx file containing the problematic VLOOKUP formula.
  2. 2. Edit the Formula: Double-click the cell displaying the #REF! error, or click it once and place your cursor in the top formula bar.
  3. 3. Correct the Index Number: Change the column index number to match the relative column in your selected array (e.g., change 8 to 2) and press Enter to instantly apply the fix.
Fully compatible with Microsoft Excel formulas, including VLOOKUP, HLOOKUP, and XLOOKUP.Built-in error checking allows you to easily spot and correct #REF!, #N/A, or #VALUE! formula issues.Completely free to use with a lightweight installation, familiar UI, and lightning-fast processing speed.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my VLOOKUP formula return a #REF! error?

The #REF! error in VLOOKUP happens when the column index number provided in the formula is larger than the total number of columns available in the specified lookup range (table_array).

How do I correctly count the column index number for VLOOKUP?

The column index number is counted from left to right, starting with 1 for the very first column of your selected lookup range. Do not count from the first column (A) of the worksheet unless your selected range starts at column A.

Can I use column letters for the column index in VLOOKUP?

No, VLOOKUP strictly requires a numerical value for the column index (col_index_num). You must input an integer representing the exact column's position within the selected table array.