How to Use Excel Formulas to Map Values to Corresponding Results
Question details
The user needs a method to systematically convert specific values in one column into corresponding target results in another column.

- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Categorizing or mapping a large dataset to new labels or corresponding data points based on predefined criteria or a lookup reference.
- Observed behavior
- The user seeks an efficient, scalable formula to automate data mapping without manual entry, successfully utilizing lookup functions over complex nested logic.
Ensure your source data does not contain hidden trailing spaces and that your reference lookup table has exact matches for the values you intend to map.
Use XLOOKUP with a Reference Table (Recommended)
Creating a separate two-column lookup table and using the XLOOKUP function is the most efficient and easily maintainable method to map corresponding values.
Using a lookup table is much cleaner than writing a long formula. If you ever need to change the mapped result, you simply update the table without rewriting the formula.
Set up a two-column table in your worksheet (for example, in AT1:AU21). List all possible original values in the first column and their corresponding expected results in the second column.
Click on the first cell of your target column (e.g., AQ1) and enter the formula: =XLOOKUP(AP1, $AT$1:$AT$21, $AU$1:$AU$21, 0). The '0' argument ensures the formula returns an exact match.
Press Enter to see the mapped result. Then, double-click the small square fill handle at the bottom-right corner of cell AQ1 to apply the formula down the entire column.
Use a Nested IF Formula for Simple Mappings
If you only have a handful of conditions to check and prefer not to create a separate lookup table, a nested IF formula is a quick alternative.
Easily Map and Analyze Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced lookup functions like XLOOKUP, VLOOKUP, and nested IF statements. It allows you to process large datasets quickly, completely free of charge.
- 1. Open your Spreadsheet: Launch WPS Office and open your .xlsx workbook containing the original data.
- 2. Insert your Lookup Formula: Select your target cell and click the 'Insert Function' button or type =XLOOKUP() to define your mapping rules.
- 3. Use AutoFill: Double-click the bottom right corner of the cell to instantly fill the rest of your data column with the correct mapped values.

Frequently Asked Questions
Why does my mapping formula return an #N/A error?
An #N/A error means the formula cannot find an exact match for the lookup value. Check for hidden spaces or spelling errors in your source values, and ensure your lookup range references are locked with absolute references (dollar signs, e.g., $AT$1).
Can I use VLOOKUP instead of XLOOKUP to map values?
Yes, you can use =VLOOKUP(AP1, $AT$1:$AU$21, 2, FALSE). However, XLOOKUP is generally preferred as it is more flexible, handles errors better natively, and doesn't strictly require the lookup value to be positioned in the very first column of your table array.
How do I map multiple columns at once using formulas?
With XLOOKUP in modern spreadsheet tools, you can return multiple columns by selecting a wider return array. If your return array spans two columns, a single formula will automatically spill the matching results into two adjacent cells.




