Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

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

Easily sort names by last name in Excel

If you have a list of names, now you want to sort the names based on the last name, how can you quickly sort it? Here is the Advanced Sort function in Kutools for Excel, it can sort data based on last names, text length, mail domain or other criteria which can do you a favor in your daily work.  Click for 60 days free trial!
doc advanced sort last name
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.

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.


Easily Combine multiple sheets/Workbook into one Single sheet or Workbook

To combinne multiples sheets or workbooks into one sheet or workbook may be edious in Excel, but with the Combine function in Kutools for Excel, you can combine merge dozens of sheets/workbooks into one sheet or workbook, also, you can consolidate the sheets into one by several clicks only.  Click for 60 days free trial!
combine sheets
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.

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.
People in conversation:
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Rob · 2 months ago
    Excel requests either 1(less than), 0(equal), or -1(greater than) for the [match type]. I am not entirely sure what FALSE would be.

    Is there another way for doing this when the columns are not the same length and the data is not identical? (example A1,A3,B2,C4,A5,C9 compared vs. X1, B2, Q4, A1, D7, A3)
    • To post as a guest, your comment is unpublished.
      Sunny · 1 months ago
      so, you want to sort A1,A3,B2,C4A5,C9 based on X1,B2,Q4,A1,D7,A3?
  • To post as a guest, your comment is unpublished.
    bass · 4 months ago
    how do you do this with two columns that need to be matched to one. for example column a has number value, column b has letter value that is dependent on column a, and column c has the same numbers as column a, but out of order.
    • To post as a guest, your comment is unpublished.
      Sunny · 4 months ago
      So you want to reorder the column c based on column a and keep column c no change?
  • To post as a guest, your comment is unpublished.
    Rajesh Reddy · 6 months ago
    Nic.. it helped me lot.. Thank you