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

or

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

Quickly Sort or select cells/Rows/Columns randomly from a selection in Excel

Kutools for Excel's Sort Range Randomly can quickly sort or select data randomly by cells or columns or rows. Click for full-featured 60 days free trial!
doc sort randomly
doc select randomly
Kutools for Excel: with more than 300 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 full-featured 60 days free trial!
combine sheets
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
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.
  • To post as a guest, your comment is unpublished.
    FRANK · 4 months ago
    It doesn't help if the info is not exactly the same in both columns eg. column 1 has C,D,B, A and column 2 has B,D,C,A,G,R,T,H. When sorting column A to match column B, they won't match up. Any solution for this?
    • To post as a guest, your comment is unpublished.
      Sunny · 3 months ago
      Sorry, the method only work while two columns have same numuber rows and same data but in different order.
  • To post as a guest, your comment is unpublished.
    Ananya · 7 months ago
    Thanks a lot for this post.. made my work a lot easier :)
  • To post as a guest, your comment is unpublished.
    Kishore · 7 months ago
    Anyone can help how to sort like below:

    Column A is having and column B is having

    1 1

    1 2

    2 1

    2 2

    But I need both column as


    1

    1

    2

    2
    • To post as a guest, your comment is unpublished.
      Sunny · 7 months ago
      I do not understand your problem, can you give me more details?
  • To post as a guest, your comment is unpublished.
    Melinda · 10 months ago
    This is what I am trying to accomplish but I can find no solutions:

    I have one spreadsheet of AR for one customer, (downloaded from QB), which I have pared down to four columns: Invoice number, date, amount billed and status.
    I have a second spreadsheet (downloaded from the customer) with six columns: Invoice number, date, amount, status, date paid and check number.

    I need to merge/align the two spreadsheets so that the invoice numbers in both “A” columns match up with each other and all other data remains intact with that invoice number. So, I am envisioning, a row looking like this:
    A1:invoice number, B1:date, C1:amount billed, D1:status (All pulled from spreadsheet 1), E1:invoice number, F1:date, G1:amount, H1:status, I1:date paid, J1:check number (All pulled from spreadsheet 2)

    Of course, if there are no matches from the second spreadsheet to the invoice number in Column A, then Columns E thru J would be blank.

    Thank you very much for any help with this issue.
  • To post as a guest, your comment is unpublished.
    Rob · 1 years 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 years ago
      so, you want to sort A1,A3,B2,C4A5,C9 based on X1,B2,Q4,A1,D7,A3?