How to Automatically Return Text from a Three-Character Code in WPS Office Excel
Question details
A user wants to enter a three-character code in one cell and automatically return the corresponding full text or related data from another column without using VBA, including on a tablet.

- Product
- WPS Office Excel
- Device & OS
- not provided
- Scenario
- The user has a lookup table with three-character codes in one column and full text in another, and needs the result to populate when a code is typed.
- Observed behavior
- After entering a valid three-character code, the related full text or data should appear automatically.
Check your lookup table layout: keep the three-character codes in one column and the full text or related data in another. Make sure the code column has no leading or trailing spaces and is formatted consistently, especially if you will use it on a tablet.
Use IFERROR with INDEX and MATCH for Exact Code Lookups
Use this when the three-character code must match exactly and your lookup table is in a fixed range such as A144:B204.
This formula works in WPS Office Excel and Microsoft Excel without VBA. It searches codes in B144:B204 and returns the adjacent value from A144:A204.
Tap or click the cell where the full text should appear, for example C27.
Type =IFERROR(INDEX($A$144:$A$204,MATCH($B27,$B$144:$B$204,0)),"") into the formula bar and press Enter.
Type a valid code in B27. The result cell displays the matching value from A144:A204, or stays blank when there is no exact match.

Use XLOOKUP with a Wildcard for Prefix Matches
Use this when the typed three-character code should match the beginning of a longer entry.
Add a Data Validation Drop-Down List of Valid Codes
Use this to reduce typing errors and make code entry easier on a tablet.
Automatically Return Text from a Three-Character Code in WPS Office Excel
Use WPS Office Spreadsheets to look up a three-character code and return its full text with built-in INDEX, MATCH, XLOOKUP, and Data Validation tools, no VBA required.
- 1. Open the workbook in WPS Office Excel: Launch WPS Office, click or tap Spreadsheets, and open the workbook that contains your code and full-text columns.
- 2. Select the result cell: Tap or click the cell where the returned text should appear, such as C27.
- 3. Enter the lookup formula: Type =IFERROR(INDEX($A$144:$A$204,MATCH($B27,$B$144:$B$204,0)),"") in the formula bar and press Enter.
- 4. Enter a code and confirm: Type a three-character code in B27. The full text from A144:A204 appears automatically, or leave the result blank when there is no match.

Frequently Asked Questions
Can I return full text from a three-character code without using VBA in WPS Office Excel?
Yes. Use =IFERROR(INDEX($A$144:$A$204,MATCH($B27,$B$144:$B$204,0)),"") in the result cell, enter the code in B27, and the exact matching value from A144:A204 is returned.
Which formula should I use if the three-character code is only the beginning of a longer entry?
Use a wildcard XLOOKUP formula. In Microsoft 365 or a WPS Office version that supports XLOOKUP, enter =XLOOKUP(B27&"*",B144:B204,A144:A204,"",2) to return the first value whose code begins with the typed text.
How do I avoid typing errors when entering codes on a tablet?
Add a Data Validation drop-down list. Select the entry cell, go to the Data tab > Data Validation, choose List, set Source to =$B$144:$B$204, and then select codes from the drop-down instead of typing them.
What happens if the three-character code does not exist in the lookup range?
The IFERROR formula returns a blank cell when no exact match is found. XLOOKUP also returns the blank value in the formula. Check for extra spaces or mismatched cell formatting if a valid-looking code returns no result.




