WPS Spreadsheet: Fix INDEX MATCH #N/A for Existing Employee IDs
Question details
The user needs to fix an INDEX MATCH formula that returns #N/A even though the employee ID appears in the lookup data.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- The user is matching employee IDs across spreadsheet columns and needs INDEX MATCH to return the corresponding employee information.
- Observed behavior
- INDEX MATCH returns #N/A because the matching IDs may use different data types, contain hidden characters, or come from misaligned lookup ranges.
Check a sample employee ID in both columns and compare its data type with ISTEXT and ISNUMBER. Confirm that the lookup and return ranges start and end on the same rows before editing the formula.
Standardize employee IDs and clean hidden characters before using INDEX MATCH
Use this solution when IDs look identical but one column stores numbers as text, or when copied data contains spaces and nonprinting characters.
INDEX MATCH requires the lookup value and lookup column to match as spreadsheet values, not just appear visually identical. Convert both employee-ID columns to one consistent type, clean unwanted characters, and use equally sized ranges.
In an empty helper cell, enter =ISTEXT(A2) and =ISNUMBER(A2) for a source ID, then repeat for the corresponding lookup ID. Compare the TRUE/FALSE results to identify text-versus-number mismatches.
Select the employee-ID column, open the Data tab, choose Text to Columns, and click Finish to convert numeric text where appropriate. Alternatively, use =VALUE(A2) for numeric IDs or =A2&"" to convert IDs to text, then copy the results and use Paste Special > Values.
In a helper column, enter =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160),""))) to remove regular spaces, nonprinting characters, and nonbreaking spaces. Fill the formula down, copy the cleaned results, and choose Paste Special > Values over the original IDs.
Use a formula such as =INDEX($D$2:$D$100,MATCH(G2,$A$2:$A$100,0)), replacing the ranges with your return column, lookup ID cell, and lookup column. Make sure both ranges contain the same number of rows and that the match type is 0.
Verify the lookup ranges and exact employee ID
Use this check when the data types already match but INDEX MATCH still cannot locate the employee ID.
Clean employee IDs and repair INDEX MATCH formulas in WPS Spreadsheet
WPS Spreadsheet provides familiar formula tools, helper columns, Paste Special, and data-cleaning commands to standardize employee IDs and fix exact INDEX MATCH lookups.
- 1. Open the workbook: Launch WPS Office, select Spreadsheet, and open the workbook containing the employee ID lookup.
- 2. Inspect ID types: Use helper cells with ISTEXT and ISNUMBER to compare the source and lookup columns.
- 3. Clean and standardize values: Use Text to Columns, VALUE, or cleaned helper formulas, then apply Paste Special > Values to the employee-ID column.
- 4. Repair the formula: Update INDEX MATCH with aligned absolute ranges and MATCH's exact-match argument 0.

Frequently Asked Questions
Why does INDEX MATCH return #N/A when the employee ID is visibly present?
The ID may be stored as text in one location and as a number in another, or it may contain leading spaces, nonbreaking spaces, or nonprinting characters. Check both values with ISTEXT, ISNUMBER, LEN, and EXACT.
How can I convert employee IDs from text to numbers in WPS Spreadsheet?
Use a helper formula such as =VALUE(A2), fill it down, copy the results, and choose Paste Special > Values. You can also select the column, open Data > Text to Columns, and click Finish when the values are numeric text.
How do I remove hidden spaces from employee IDs?
Use =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160),""))) in a helper column, fill it down, then copy the cleaned results and paste them as values over the original IDs.
What does the 0 in MATCH mean for INDEX MATCH?
The 0 tells MATCH to find an exact value only. A formula such as =INDEX($D$2:$D$100,MATCH(G2,$A$2:$A$100,0)) is appropriate when employee IDs must match precisely.
Can misaligned ranges cause an INDEX MATCH #N/A error?
Yes. The lookup range and return range should cover corresponding rows, and the lookup column must contain the IDs referenced by MATCH. Check that both ranges start and end on the intended rows.




