Why alphabetical sorting gets numbers wrong
A normal text sort compares one character at a time, so 10 comes before 2 because the character 1 sorts before 2. Numeric sorting reads the actual value, so 2 comes first, then 10.
How the number is found
For each line the tool uses the first number it finds. That can be a whole line of digits or a number inside text, such as the 10 in Item 10. It reads:
- negative numbers such as -3
- decimals such as 7.5
- thousands separators such as 1,250.50, which is read as 1250.5
Decimal commas, used in some countries, are not converted. Write decimals with a point.
Lines without a number
Choose where lines with no number go: at the bottom, at the top, or removed. They keep that position whichever direction you sort.
Example
The lines Item 10, Item 2, Price 1,250.50, notes only, -3 degrees, 7.5 kg and Item 1 sort to -3 degrees, Item 1, Item 2, 7.5 kg, Item 10, Price 1,250.50, with notes only at the bottom.
If numbers appear inside names, such as file2 and file10, the Natural method in the main sort tool may suit you better. For plain alphabetical order use sort lines alphabetically. See the sorting guide for more.