November 17, 2018

Horizontal sorting

ProTip: you can sort a row of cells with the same commands as a column of cells. Use this for sorting column headers.

This one’s obvious once you’ve seen it but typically sorting is viewed as going down a column. You can force Excel to sort cells horizontally as well. From the Sort menu, hit the options in the upper right, and then choose Move Horizontally. This will then give the choices down below using labels like Row 1 and Row 2 instead of the normal Column A and Column B. This can be used to simply sort cells horizontally or to reorder columns by sorting. It’s more intuitive to think of sorting down a column, but just remember you can perform as the same operations transposed.

This technique is useful enough that I’ve create a simple macro which does it from a button click. The only downside to hormonal sorting is that Excel requires several clicks to do it.