Formula Errors

Fix Excel VLOOKUP or INDEX-MATCH When the Lookup Value Is a Formula

Jason MillerJason Miller Dec 2, 2026 869 views

Question details

Find out why an Excel lookup fails when its lookup value is returned by another INDEX formula.

Fix Excel Lookups When the Lookup Value Is a Formula
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants VLOOKUP or INDEX-MATCH to find a value produced by an INDEX formula.
Observed behavior
The lookup formula fails to find the expected value.
Before you start

Identify the cell containing the INDEX result and the column where Excel should find it. Check whether the INDEX formula itself returns the expected value or an error.

Solution 1Recommended

Compare the INDEX result with the lookup values

Use this check when the lookup value and a table entry look the same but do not match.

1
Test the values

If C4 contains the INDEX result and E2 contains an expected match, enter =C4=E2 in an empty cell. FALSE means Excel does not consider the values equal.

2
Check data types

Enter =ISNUMBER(C4) and =ISNUMBER(E2) in empty cells. If only one returns TRUE, a number or date may be stored as text on the other side.

3
Check for extra spaces

Compare =LEN(C4) with =LEN(E2). For text values, test =TRIM(C4) and =TRIM(E2) in helper cells to remove leading, trailing, and repeated ordinary spaces.

4
Align the values

Correct the source data or use helper columns so the lookup value and lookup column use the same data type. For text that should be numeric, test =VALUE(C4); keep identifiers with meaningful leading zeros as text.

Compare the INDEX result with the lookup values
Dates and formatting: Changing a cell's display format does not convert a text date into a real Excel date. Check the underlying values and data types on both sides.
Work with formulas in WPS Spreadsheets

Check and Fix Lookup Formulas in WPS Spreadsheets

Open your workbook in WPS Spreadsheets to inspect an INDEX result, compare it with the lookup column, and use an exact-match formula.

  1. 1. Open the workbook: In WPS Spreadsheets, open the Excel workbook and select the sheet containing the lookup formula.
  2. 2. Inspect the lookup value: Select the cell containing the INDEX formula, such as C4, and check its displayed result and formula.
  3. 3. Compare the data: In empty cells, enter =ISNUMBER(C4) and =ISNUMBER(E2), replacing E2 with an expected lookup-table match. Correct any inconsistent data types or extra spaces.
  4. 4. Enter an exact-match formula: In the result cell, enter =VLOOKUP(C4,E2:F100,2,FALSE) or =INDEX(F2:F100,MATCH(C4,E2:E100,0)), adjusting the ranges to your sheet.
Check formula results and data types in helper cellsUse VLOOKUP and INDEX-MATCH for exact lookupsOpen and edit Microsoft Excel XLS and XLSX filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Can VLOOKUP use a value returned by an INDEX formula?

Yes. Reference the cell containing the INDEX result, such as =VLOOKUP(C4,E2:F100,2,FALSE), or use the INDEX formula itself as the lookup value.

Why does my lookup return #N/A when the values look identical?

The values may have different data types or extra spaces. Compare them with =C4=E2, check their types with ISNUMBER, and use LEN or TRIM to investigate spaces.

How do I make INDEX-MATCH find an exact match?

Set the third MATCH argument to 0. For example, =INDEX(F2:F100,MATCH(C4,E2:E100,0)) searches E2:E100 and returns the corresponding value from F2:F100.

Will changing a date's cell format fix a lookup mismatch?

Not necessarily. A text date and a real Excel date can look alike but have different underlying values. Use ISNUMBER to check each cell and convert text dates to real dates when appropriate.