PRACTICAL GUIDE

Choose Numeric or Text Sorting for a List

Numbers stored as text can sort differently from numerical values.

Look at the meaning of the items

Numbers stored as text can sort differently from numerical values. The strings 1, 10 and 2 are already in a common text order, but their numeric order is 1, 2, 10. Choose a mode deliberately.

Remove blank entries when appropriate

A blank line may be an empty record or simply spacing. The blank-line setting controls whether it remains. A blank is not automatically treated as a zero in numeric mode.

Do not use it as a spreadsheet parser

A line containing a comma-separated row is still one string here. Sorting the whole line is different from sorting by a particular field. Use a spreadsheet or a format-aware tool for structured columns.

Keep a copy of the original order

Sorting rearranges the list and cannot infer which order was meaningful beforehand. If the sequence records time, priority or another relationship, save that information before replacing it with an alphabetical or numeric order.

Put it into practice