Function Problems

Fix VLOOKUP and INDIRECT Number-Text Mismatches in Excel

Elise WilliamsElise Williams Dec 2, 2026 868 views

Question details

Match the lookup value and source column data types in a VLOOKUP formula that uses INDIRECT to reference another sheet.

Fix VLOOKUP and INDIRECT Number-Text Mismatches in Excel
Product
Microsoft Excel and WPS Spreadsheets
Device & OS
not provided
Scenario
A spreadsheet uses a date-based sheet name in INDIRECT and searches the first column of that sheet with VLOOKUP.
Observed behavior
A lookup may not find a match when one value is numeric and the other is stored as text, even if they look alike.
Before you start

Check that B3 contains a valid date and that a sheet named with the corresponding MMYYYY value exists. Compare the actual data types in C3 and the referenced sheet's column A; formatting alone does not necessarily change a value's type.

Solution 1Recommended

Use a numeric lookup value for a numeric source column

Use this approach when the values in the referenced sheet's column A are stored as numbers.

1
Check the source values

Open the sheet named for the date in B3 and inspect column A. In an empty cell, use =ISNUMBER(A2) to check whether a source value is numeric.

2
Enter the lookup formula

In the result cell, enter =VLOOKUP($C3,INDIRECT("'"&TEXT($B3,"MMYYYY")&"'!A2:G65404"),1,0) if C3 is already numeric.

3
Convert numeric text if needed

If C3 contains a number stored as text, use =VLOOKUP(VALUE($C3),INDIRECT("'"&TEXT($B3,"MMYYYY")&"'!A2:G65404"),1,0) instead.

4
Check the return column

Press Enter and check the result. Change the column index 1 to a value from 2 through 7 if you need to return a different column from A:G.

Use a numeric lookup value for a numeric source column
Numeric conversion limitation: VALUE returns an error if C3 cannot be interpreted as a number. Numeric conversion also removes the significance of leading zeros.
Fix lookups in WPS Spreadsheets

Resolve VLOOKUP Type Mismatches in WPS Spreadsheets

Use WPS Spreadsheets to check the lookup and source value types, then adjust the VLOOKUP and INDIRECT formula to use matching numbers or text.

  1. 1. Open the workbook: Open WPS Spreadsheets, select Open, and choose the workbook containing the lookup formula.
  2. 2. Check the source type: Open the date-named source sheet and enter =ISNUMBER(A2) or =ISTEXT(A2) in an empty cell to check a lookup value in column A.
  3. 3. Adjust the formula: Select the result cell and use VALUE($C3) for numeric source values when C3 is numeric text, or $C3&"" for matching source text values.
  4. 4. Test and save: Press Enter to test the lookup, then select Save to keep the corrected formula in the workbook.
Check lookup data with ISNUMBER and ISTEXTUse VLOOKUP, INDIRECT, VALUE, and TEXT in spreadsheet formulasOpen and edit Microsoft Excel XLSX and XLS filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does VLOOKUP return #N/A when the values look the same?

One value may be a number while the other is text, or the text may contain different spaces or leading zeros. Use ISNUMBER and ISTEXT in empty cells to check the lookup value and source value.

Does changing a cell's format to Text convert an existing number?

Not necessarily. Formatting changes how a value is displayed, but an existing numeric value can remain numeric. Use a conversion formula or re-enter the value as text, then verify it with ISTEXT.

What does the 1 in the VLOOKUP formula return?

The column index 1 returns a value from the first column of the lookup range, which is column A in A2:G65404. Change it to 2 through 7 to return another column in that range.

Why does INDIRECT return a reference error?

Check that B3 is a valid date and that TEXT(B3,"MMYYYY") produces the exact source sheet name. Also confirm that the sheet exists and the range in the INDIRECT formula is valid.

How can I keep leading zeros in an identifier?

Store identifiers as consistent text in the lookup column. If the lookup value is numeric and identifiers have a fixed width, use a formula such as TEXT(C3,"00000") to create a five-digit text value.