Log in


How to quickly sort rows to match another column in Excel?

doc sort match to another column 1
If you have two lists in a sheet, and both of them have same values but in different order, how can you sort one list to match another list as below screenshot shown? In this article, I will introduce a formula to help you quickly solve it in Excel.
Sort rows to match another column

Advanced Sort -- By Last Name (sort data based on criteria, such as sort by text length, sort by last name. sort by absolute value and so on.)

doc advanced sort last name

arrow blue right bubble Sort rows to match another column

To sort rows to match another column, here is a formula can help you.

1. Select a blank cell next to the column you want to resort, for instance B1, and then enter this formula =MATCH(A1,C:C,FALSE), and drag autofill handle down to apply this formula. See screenshot:
doc sort match to another column 2

Tip: C:C is the column you want to resort based on, and A1 is the first cell of the column you want to sort.

2. And then a list of numbers are displaying in the formula cells. Select the list you want to resort and the numbers list, and click Data > Sort. See screenshot:
doc sort match to another column 3

3. And in the Sort dialog, select the column which contains the formulas from Column drop down list, and select Values and Smallest to Largest from the Sort On and Order drop down lists separately. See screenshot:
doc sort match to another column 4

4. Click OK. And the column A is sorted to match column C.
doc sort match to another column 5

Tip: You can delete the formula column after sorting if you do not need it any more.

doc attention 1  Kutools for Excel's Auto Text, collect all formulas to a group as auto text, you can insert them anytime as you want whithout remembering! Free Download Now!

Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.