sorting numbers in a given order in excel -
in excel want sort columns in given order. example, given have list of columns of id , beat b, want sort columns id in order given oder , corresponding value of beat matches sorted order of id.
given following list of id , beat
33345666 3 44563334 7 39304955 0 22352564 3 76488854 4 23456784 0
what want sort columns of occurrence in order of id in following order
44563334 33345666 23456784 22352564 39304955 76488854
so like:
44563334 7 33345666 3 23456784 0 22352564 3 39304955 0 76488854 4
what easiest , convenient way this?
as example, if list giving order want put items in sheet2 a1:a6 add column
=match(a1,sheet2!$a$1:$a$6,0)
then sort on that. aware ids aren't in list return #n/a error. can around wrapping in iferror function, eg
=iferror(match(a1,sheet2!$a$1:$a$6,0),99999)
Comments
Post a Comment