Fix Excel VLOOKUP or INDEX-MATCH When the Lookup Value Is a Formula
Question details
Find out why an Excel lookup fails when its lookup value is returned by another INDEX 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.
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.
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.
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.
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.
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.
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.

Use an exact-match lookup formula
Use exact matching after confirming that the INDEX result and lookup values have consistent types.
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. Open the workbook: In WPS Spreadsheets, open the Excel workbook and select the sheet containing the lookup formula.
- 2. Inspect the lookup value: Select the cell containing the INDEX formula, such as C4, and check its displayed result and formula.
- 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. 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.

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.




