How can I sort one set of data to match another set of data in Excel?

后端 未结 3 662
天命终不由人
天命终不由人 2021-02-06 07:25

I have a list of data that is not in alphabetical or numerical order. I want to sort a second list of the same date to match the first list. I cannot change the order of the d

相关标签:
3条回答
  • 2021-02-06 08:13

    You could also simply link both cells, and have an =Cell formula in each column like, =Sheet2!A2 in Sheet 1 A2 and =Sheet2!B2 in Sheet 1 B2, and drag it down, and then sort those two columns the way you want.

    • If they don't sort the way you want, put the order you want to sort them in another column and sort all three columns by that.
    • If you drag it down further and get zeros you can edit the =Cell formula to show "" IF there is nothing. =(if(cell="","",cell)
    • Cutting, pasting, deleting, and inserting rows is something to be weary of. #REF! errors could occur.

    This would be better if your unique items change also, then all you would do is sort and be done.

    0 讨论(0)
  • 2021-02-06 08:16

    You could also use INDEX MATCH, which is more "powerful" than vlookup. This would give you exactly what you are looking for:

    enter image description here

    0 讨论(0)
  • 2021-02-06 08:22

    You can use VLOOKUP.

    Assuming those are in columns A and B in Sheet1 and Sheet2 each, 22350 is in cell A2 of Sheet1, you can use:

    =VLOOKUP(A2, Sheet2!A:B, 2, 0)
    

    This will return you #N/A if there are no matches. Drag/Fill/Copy&Paste the formula to the bottom of your table and that should do it.

    0 讨论(0)
提交回复
热议问题