How to Match Two Excel Lists and Keep Corresponding Values Together
Question details
The user needs to match titles from two different data lists in Excel and extract their corresponding terms into a single view without manually rearranging the source rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Comparing two datasets and automatically pulling associated values based on a matching title or ID.
- Observed behavior
- The goal is to automatically display the corresponding term from a second list next to the matched title in the first list.
Ensure both lists have exactly matching title strings without any trailing spaces, as lookup functions require precise text matches to return correct values.
Use VLOOKUP and IFERROR to Match Lists
VLOOKUP is the standard approach to search for a value in one list and return a corresponding value from another column.
By combining VLOOKUP with IFERROR, you can cleanly pull matched terms and leave the cell blank if a title is not found in the second list.
Click on the blank cell in the row of your first list where you want the matched term to appear (for example, B2 next to title A2).
Type the formula `=IFERROR(VLOOKUP(A2,$C$2:$D$11,2,FALSE),"")` in the formula bar. Here, A2 is the title to match, and C2:D11 is the range of the second list.
Press Enter to get the result. Click the cell, hover over the bottom-right corner until you see a cross icon, and drag it down to copy the formula for all titles.

Use XLOOKUP for Flexible Matching (Newer Versions)
XLOOKUP is a modern, flexible function available in newer Excel versions that handles missing values automatically.
Use MATCH and Sort to Align Rows
If you want to physically sort and align the two lists side-by-side rather than just extracting values, use the MATCH function as a sorting helper.
Easily Match Excel Lists Using WPS Spreadsheet
WPS Spreadsheet fully supports advanced data lookup functions, including VLOOKUP, XLOOKUP, and MATCH, allowing you to pull and align corresponding values from massive lists seamlessly.
- 1. Open your data file: Launch WPS Spreadsheet and open the .xlsx file containing your two lists.
- 2. Select the target cell: Click the blank cell adjacent to your first list's title where the matching value should be placed.
- 3. Input the lookup formula: Type your `=VLOOKUP(...)` or `=XLOOKUP(...)` formula directly into the cell or use the Insert Function tool to be guided through the arguments.
- 4. Drag to fill: Use the fill handle in the lower right corner of the active cell to quickly pull matching values for the rest of your list.

Frequently Asked Questions
Why does my VLOOKUP return an #N/A error even though the titles look identical?
This is typically caused by hidden trailing spaces, leading spaces, or differing data formats (e.g., text vs. numbers). You can wrap your lookup value in the TRIM function, like `VLOOKUP(TRIM(A2),...)`, to clear hidden spaces before matching.
Can I match lists that are on two different sheets or workbooks?
Yes. When typing your VLOOKUP or XLOOKUP formula, simply click onto the other sheet or workbook to highlight the source range. The formula bar will automatically generate the correct sheet reference, such as `Sheet2!$C$2:$D$11`.
What is the primary advantage of using XLOOKUP over VLOOKUP?
XLOOKUP is more robust: it does not require your lookup column to be the first column in your selected array, it defaults to exact matches, and it includes a built-in argument to handle 'not found' cases, eliminating the need for an external IFERROR function.




