SOLVED

Reorder columns from averages

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3065419%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EReorder%20columns%20from%20averages%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3065419%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EI%20have%20a%20simple%20Excel%20table%2C%20like%20so%3A%26lt%3B%5C%2FP%26gt%3B%3CTABLE%20border%3D%22%5C%26quot%3B1%5C%26quot%3B%22%20width%3D%22%5C%26quot%3B100%25%5C%26quot%3B%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CSTRONG%3EEvent%20Name%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20A%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20B%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20C%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20D%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20E%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%26lt%3B%5C%2FTR%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2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C%2FTD%26gt%3B%26lt%3B%5C%2FTR%26gt%3B%26lt%3B%5C%2FTBODY%26gt%3B%26lt%3B%5C%2FTABLE%26gt%3B%3CP%3ENow%20that%20I%20have%20this%20table%2C%20I%20would%20like%20to%20be%20able%20to%20have%20Excel%20automatically%20reorder%20the%20columns%20based%20on%20the%20Averages%20shown%20in%20the%20bottom%20row.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20from%20the%20two%20events%20shown%20here%2C%20we%20have%20the%20averages%20of%20the%20five%20players%20at%201.5%2C%203.5%2C%201.5%2C%204%2C%20and%204.5.%20I%20would%20like%20so%20that%20players%20A%20and%20C%20are%20therefore%20shifted%20to%20be%20the%20leftmost%20columns%20in%20the%20table%2C%20and%20the%20higher%20averages%20are%20at%20the%20right%2C%20like%20so%3A%26lt%3B%5C%2FP%26gt%3B%3CTABLE%20border%3D%22%5C%26quot%3B1%5C%26quot%3B%22%20width%3D%22%5C%26quot%3B100%25%5C%26quot%3B%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CSTRONG%3EEvent%20Name%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20A%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20C%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20B%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%3B%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EPlayer%20D%20Rank%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FTD%26gt%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%2FTD%3E%3CTD%3E4%26lt%3B%5C%2FTD%26gt%3B%3C%2FTD%3E%3CTD%3E4.5%26lt%3B%5C%2FTD%26gt%3B%26lt%3B%5C%2FTR%26gt%3B%26lt%3B%5C%2FTBODY%26gt%3B%26lt%3B%5C%2FTABLE%26gt%3B%3CP%3EI've%20dabbled%20around%20somewhat%20with%20experimentation%20but%20I%20haven't%20been%20able%20to%20find%20a%20way%20to%20do%20this.%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3065419%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3ECharting%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EExcel%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EFormulas%20and%20Functions%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
New Contributor

I have a simple Excel table, like so:

Event NamePlayer A RankPlayer B RankPlayer C RankPlayer D RankPlayer E Rank
Dodgeball: Jan. 11st4th2nd3rd5th
Drag Race: Feb. 32nd4th1st3rd5th
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 NamePlayer A RankPlayer C RankPlayer B RankPlayer D RankPlayer E Rank
Dodgeball: Jan. 11st2nd4th3rd5th
Drag Race: Feb. 32nd1st4th3rd5th
Averages:1.51.53.544.5

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

1 Reply
best response confirmed by ExpertCoder14 (New Contributor)
Solution

@ExpertCoder14 

 

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

=SORTBY(B1:F4,B4:F4)

 

alannavarro_0-1642654377434.png