Function Problems

How to Automatically Return Text from a Three-Character Code in WPS Office Excel

Muhammad TalhaMuhammad Talha Nov 13, 2026 871 views

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.

How to Automatically Return Text from a Three-Character Code in WPS Office Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Tap or click the cell where the full text should appear, for example C27.

2
Enter the INDEX/MATCH formula

Type =IFERROR(INDEX($A$144:$A$204,MATCH($B27,$B$144:$B$204,0)),"") into the formula bar and press Enter.

3
Test with a three-character code

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 IFERROR with INDEX and MATCH for Exact Code Lookups
Exact lookup ready: Use this formula when codes are entered exactly as they appear in the code column and you do not need wildcard matching.

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. 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. 2. Select the result cell: Tap or click the cell where the returned text should appear, such as C27.
  3. 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. 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.
No VBA required: build the lookup with built-in INDEX, MATCH, XLOOKUP, and Data Validation.Preserves Microsoft Excel compatibility so .xlsx, .xls, and .csv files open and save correctly.Touch-friendly on tablets, making code selection and result viewing easier on mobile devices.Free and lightweight Office suite with a familiar spreadsheet interface.
microsoft office alternative - wps office

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.