Sort Text Labels by Numeric Value in Excel 2019
Question details
Sort text labels by their numeric suffix in ascending order rather than alphabetically.

- Product
- Microsoft Excel 2019
- Device & OS
- not provided
- Scenario
- A column contains labels such as Person 1, Person 101, and Person 3, and the user wants to sort them by the numbers.
- Observed behavior
- A text sort places Person 101 before Person 3 instead of sorting the numeric suffixes in ascending order.
Check that the labels follow a consistent pattern, with the number after the first space. These steps assume the labels are in column A, with a header in A1 and the first label in A2.
Sort labels using a numeric helper column in Excel 2019
Extract each numeric suffix into a helper column, then sort the full table by that column.
Insert a new column next to the labels and enter a header such as Sort Number in B1.
In B2, enter =VALUE(MID(A2,FIND(" ",A2)+1,LEN(A2))) and press Enter.
Drag the fill handle from B2 down to the last row of labels.
Select the entire data range, including related columns and headers. Go to Data > Sort, check My data has headers, select Sort Number, and choose Smallest to Largest.

Sort numeric text labels in WPS Spreadsheet
Use a helper column in WPS Spreadsheet to extract numeric suffixes and sort labels in ascending numeric order.
- 1. Open the spreadsheet: Open WPS Office, launch Spreadsheet, and open your Excel file.
- 2. Create a helper column: Add a column next to the labels, with a header such as Sort Number.
- 3. Extract the suffixes: Assuming the first label is in A2, enter =VALUE(MID(A2,FIND(" ",A2)+1,LEN(A2))) in B2 and fill it down.
- 4. Sort by number: Select the full table, open Data > Sort, and sort the helper column from smallest to largest.

Frequently Asked Questions
Why does Person 101 appear before Person 3?
Excel sorts the labels as text, comparing characters from left to right. Extracting the suffix into a numeric helper column lets you sort by its value instead.
Will sorting the helper column move the rest of each row?
Yes, if you select the entire table before choosing Data > Sort. This keeps the labels and related data together.
What if the formula returns an error?
Check that each label contains a space followed by a numeric suffix, such as Person 3. The formula uses FIND to locate the first space and VALUE to convert the remaining text to a number.
Can I remove the helper column after sorting?
Yes. Once the rows are in the desired order, select the helper column and delete it if you no longer need it. Add it again if you need to repeat the numeric sort later.




