SOLVED

New Contributor

# Reorder columns from averages

I have a simple Excel table, like so:

 Event Name Player A Rank Player B Rank Player C Rank Player D Rank Player E Rank Dodgeball: Jan. 1 1st 4th 2nd 3rd 5th Drag Race: Feb. 3 2nd 4th 1st 3rd 5th Averages: =AVERAGE(B2, B3) =AVERAGE(C2, C3) =AVERAGE(D2, D3) =AVERAGE(E2, E3) =AVERAGE(F2, F3)

Now that I have this table, I would like to be able to have Excel automatically reorder the columns based on the Averages shown in the bottom row.

For example, from the two events shown here, we have the averages of the five players at 1.5, 3.5, 1.5, 4, and 4.5. I would like so that players A and C are therefore shifted to be the leftmost columns in the table, and the higher averages are at the right, like so:

 Event Name Player A Rank Player C Rank Player B Rank Player D Rank Player E Rank Dodgeball: Jan. 1 1st 2nd 4th 3rd 5th Drag Race: Feb. 3 2nd 1st 4th 3rd 5th Averages: 1.5 1.5 3.5 4 4.5

I've dabbled around somewhat with experimentation but I haven't been able to find a way to do this.

best response confirmed by ExpertCoder14 (New Contributor)
Solution

# Re: Reorder columns from averages

Hello, if you have Microsoft 365 you could use the formula.

=SORTBY(B1:F4,B4:F4)