SheetCommand · Data editing

How to sort an Excel file by a column

Sort by price, stock, or another column without separating values from their rows.

Sorting a stock list can put the largest quantities or lowest prices in view. SheetCommand finds the column named in your command and reorders whole rows by its values. The other cells belonging to each record move with it.

Name the column and direction

Use the heading shown in your file. For example, Sort 'Stock' descending puts larger stock values first. Use ascending for the reverse order; if you do not specify a direction, the tool sorts ascending.

Quoting a heading helps when it contains spaces or resembles another name: Sort 'Unit Price' descending. One command sorts by one column, so check which field should decide the order.

Run the sort and inspect it

Upload your file, run the command, then inspect the first rows in the processed preview. Missing values in the chosen column are placed at the end. Download the new XLSX file when the order looks right.

If numbers were stored as text in the source file, their order may differ from numeric order. The sort command does not convert text cells into numbers. Check the source column type when results look unexpected.

How to do it

  1. Upload the file and note the exact column heading.
  2. Run Sort 'Stock' descending.
  3. Check the reordered rows and download the file.
Example commandSort 'Stock' descending

Your records stay together

The operation moves complete rows rather than rearranging only the cells in Stock. Product names, prices, and other fields remain attached to their records.

Custom sort rules and a priority order across several columns are outside this command. If you need a particular tie-breaker, examine the preview before relying on the downloaded order.

Frequently asked questions

How do I sort from smallest to largest?

Use a command such as Sort 'Stock' ascending. Ascending is also the default when no direction is given.

Where do blank values go?

Missing values in the selected column are placed at the end of the sorted table.

SheetCommand

Try it on your file

Try the supported cleanup, sorting, and summary commands on your file. Use formula and script examples in their respective applications.

Use for free →