SOLVED

How to sort a table

Copper Contributor

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,...

in each box some figures from 0 to 20.

 

I would like to file the column and the line with the highest value from left to right and top to bottom. Basically I would like to have the bests figures on the top left side of the table and the worse bottom right. I am looking for the best combinations between columns and lines. Election of the couple for instance CC-D together with EE-C.

 

Count of familiesABCDE
AA10000
BB45200
CC210120
DD10000
EE011230
FF02010

 

Hope this is clear.

Fab.

 

5 Replies

@Fab_Gre 

I'd use a helper row and column.

S1315.png

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.

S1316.png

Select Sort & Filter > Custom Sort... again.

This time, click Options..., select 'Sort left to right' and click OK.'

S1317.png

Select the row containing the max values (row 8 in this example), make sure that Largest to Smallest is selected, then click OK.

S1319.png

Result:

S1320.png

best response confirmed by Fab_Gre (Copper Contributor)
Solution

@Hans Vogelaar, very smart, that's a pretty good idea.

Tank you very much for your help.

@Hans Vogelaar 

 

any ideas what to do if the sort left to right function is disabled? 

@katador1989 

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).

HansVogelaar_0-1682677148215.png

@Hans Vogelaar 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 :)

1 best response

Accepted Solutions
best response confirmed by Fab_Gre (Copper Contributor)
Solution

@Hans Vogelaar, very smart, that's a pretty good idea.

Tank you very much for your help.

View solution in original post