DevilDog
DevilDog

Reputation: 45

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

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

Upvotes: 0

Views: 212

Answers (2)

player0
player0

Reputation: 1

use:

=SORT(TRANSPOSE(A1:D2), 2, )

enter image description here

or:

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

enter image description here

Upvotes: 2

SputnikDrunk2
SputnikDrunk2

Reputation: 4038

SUGGESTION

Perhaps you can try this way:

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

Sample Sheet

enter image description here

Reference

Upvotes: 2

Related Questions