How to Mark Matching Names with "Fix" in Excel for Sorting
Question details
The user wants to compare a main list of names with a reference list and mark matches with a specific word ("Fix") to enable easy sorting.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Comparing two lists of names to identify and isolate specific records that need updating or changes.
- Observed behavior
- The user needs a formula to output "Fix" next to names in Column A that appear in the reference list in Column D, enabling sorting by the new column.
Ensure your reference list contains no trailing spaces or formatting inconsistencies, as exact matches are required for the comparison formula to work properly.
Using IF, ISNUMBER, and XMATCH Functions
This method uses modern Excel functions to accurately identify matches against a reference array and return a specific text label.
The XMATCH function looks up a value and returns its relative position. Wrapping it in ISNUMBER checks if a match was found. The IF function then outputs "Fix" for true results and leaves the cell blank for false results.
Click on cell B1, or the first cell in your helper column adjacent to the main list.
Type `=IF(ISNUMBER(XMATCH(A1,$D$1:$D$11)),"Fix","")` and press Enter. Adjust the `$D$1:$D$11` absolute reference to match the exact range of your reference list.
Double-click the fill handle at the bottom-right corner of cell B1, or drag it down to apply the formula to all names in column A.
Select your entire data range, navigate to the Data tab, click "Sort", choose Column B, and sort alphabetically to group all rows marked "Fix" together.

Using IF, ISNA, and VLOOKUP for Older Versions
If you are using an older version of Excel that does not support the XMATCH function, you can achieve the same result using VLOOKUP.
Easily Compare Lists and Use Formulas in WPS Spreadsheet
WPS Spreadsheet offers full support for advanced formulas like IF, VLOOKUP, and XMATCH, making it incredibly easy to compare data lists, mark matches, and sort your worksheets quickly.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing your lists.
- 2. Input the comparison formula: In the blank column next to your main list, type `=IF(ISNUMBER(MATCH(A1,$D$1:$D$11,0)),"Fix","")`.
- 3. Drag to fill: Drag the green fill handle down to apply the matching logic across your entire dataset.
- 4. Sort your results: Highlight the columns, navigate to the Data tab, and click Sort to bring all "Fix" rows to the top.

Frequently Asked Questions
Why does the formula return a blank even though the name is in both lists?
This usually happens due to invisible spaces or different formatting (like text vs. general). Use the TRIM function on both columns to clean the data, or use Find and Replace to remove accidental trailing spaces.
Can I highlight the matching rows with color instead of marking them with text?
Yes. You can use Conditional Formatting. Select your main list, go to Home > Conditional Formatting > New Rule, choose "Use a formula to determine which cells to format", enter `=ISNUMBER(MATCH(A1,$D$1:$D$11,0))`, and then set your preferred background fill color.
What if I want to return a value from the reference list instead of the word "Fix"?
You can use the XLOOKUP or VLOOKUP function. For example, `=XLOOKUP(A1,$D$1:$D$11,$E$1:$E$11,"Not Found")` will return the corresponding value from column E if a match is found in column D.




