Home > Enterprise >  Sort Column header based on row value, and show as columns
Sort Column header based on row value, and show as columns

Time:03-10

We have sheet with column names and values in the cells below. We like to have a list of the names and the value next to it ordered.

example.

A B C D E
1 John Mary Tom Grace
2 3 4 5 2

and we would like the same data below which looks like...

A B
1 Tom 5
2 Mary 4
3 John 3
4 Grace 2

Any ideas? Thanks

CodePudding user response:

SUGGESTION

Perhaps you can try this way:

=QUERY(TRANSPOSE(A1:D2),"SELECT * order by Col2 DESC")

Sample Sheet

enter image description here

Reference

  • enter image description here

    or:

    =SORT(TRANSPOSE({A1:D1; A4:D4}), 2, )
    

    enter image description here

  • Related