Data & CSV
Sort CSV rows
Sort an export by one column while retaining its header.
A clear answer. Here’s how.
Uses stable sorting by a one-based column position. Numeric mode requires every cell in that column to contain a finite number. Text mode uses English locale collation. Header and all columns are preserved; CSV exports protect potential formulas.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- CSV data
Name,Group,Score Alex,A,72 Sam,B,85 Jo,A,91
- Column position (starts at 1)
- 3
- Sort values as
- Numbers
- Order
- Descending
Example result
| Name | Group | Score |
|---|---|---|
| Jo | A | 91 |
| Sam | B | 85 |
| Alex | A | 72 |