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 30 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 30 days.
 
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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.  strong>Click for full-featured 30 days free trial!
combine sheets
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
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 · 10 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 · 9 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.
        Sujith · 2 months ago
        Please share some way to sort 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.
  • To post as a guest, your comment is unpublished.
    Ananya · 1 years ago
    Thanks a lot for this post.. made my work a lot easier :)
  • To post as a guest, your comment is unpublished.
    Kishore · 1 years 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 · 1 years ago
      I do not understand your problem, can you give me more details?
  • To post as a guest, your comment is unpublished.
    Melinda · 1 years 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?
  • To post as a guest, your comment is unpublished.
    bass · 1 years 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 · 1 years 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 · 1 years ago
    Nic.. it helped me lot.. Thank you