Forum Discussion
Fab_Gre
Apr 20, 2022Copper Contributor
How to sort a table
Hi all, i am looking for a solution to arrange a table, this seems not that difficult but I hit a snag. There is the point: - x lines with AA, BB, CC,... values - y column with A, B, C, D,... ...
- Apr 20, 2022
HansVogelaar, very smart, that's a pretty good idea.
Tank you very much for your help.
HansVogelaar
Apr 20, 2022MVP
I'd use a helper row and column.
In B8: =MAX(B2:B7)
Fill to the right to F8.
In G2: =MAX(B2:F2)
Fill down to G7.
Click anywhere in the data.
On the Home tab of the ribbon, select Sort & Filter > Custom Sort...
Select Max in the Column drop-down and select Largest to Smallest in the Order drop-down.
Click OK.
Select Sort & Filter > Custom Sort... again.
This time, click Options..., select 'Sort left to right' and click OK.'
Select the row containing the max values (row 8 in this example), make sure that Largest to Smallest is selected, then click OK.
Result:
- katador1989Apr 28, 2023Copper Contributor
- HansVogelaarApr 28, 2023MVP
Are you trying to sort a table, or part of a table?
It is not possible to sort left to right inside a table, because it would violate the table structure.
If you really need to to so, convert the table to a range (Table Design tab of the ribbon, Tools group, Convert to Range).
- katador1989Apr 29, 2023Copper Contributor
HansVogelaar that's the ticket!
Yes, I was trying to do that and the button wasn't where the 'help' advice told me that it was. Thank you! Very helpful 🙂
- Fab_GreApr 20, 2022Copper Contributor
HansVogelaar, very smart, that's a pretty good idea.
Tank you very much for your help.