Sort by Column

Sorts each row by one of its columns, such as students by score, products by price or players by points, while keeping every row in one piece.

Advertisement

When to use it

Use it whenever each line holds several pieces of information and you want to sort by one that isn’t first:

  • Gradebooks and rosters: student name, ID number, percentage score
  • League tables: team or player with wins, points or stats
  • Inventory and price lists: SKU, description, stock, price
  • Exported data: CSV rows, log lines, ticket or order numbers

How columns are found

Text copied from Excel or Google Sheets is separated by tabs, which is detected automatically. CSV rows use commas; “quoted, values” stay together as one column. Anything else is split on spaces. You can also choose the separator yourself.

Columns of numbers sort as numbers, including 94%, $1,240.00 and negative values. Text columns sort alphabetically. Rows with the same value keep their original order, so to sort by two columns, sort by the less important one first and the more important one second.

Class list by score (column 2, highest first)

Before
Santos, Maria	88%
Reyes, Juan	94%
Cruz, Ana	71%
Garcia, Leo	94%
After
Garcia, Leo	94%
Reyes, Juan	94%
Santos, Maria	88%
Cruz, Ana	71%

Price list from a CSV (last column)

Before
SKU-104,Water pump,$129.00
SKU-221,Fan belt,$18.50
SKU-009,"Radiator, large","$1,240.00"
After
SKU-221,Fan belt,$18.50
SKU-104,Water pump,$129.00
SKU-009,"Radiator, large","$1,240.00"

Questions

Why not just sort in the spreadsheet?

You can, but this is quicker for text you’ve copied from an email, a web page, a PDF or a log file that isn’t in a spreadsheet yet.

My rows didn’t split into columns correctly.

Choose the separator under “Columns are separated by”. If names contain spaces, use tabs or commas between columns rather than spaces.