How to Fix Excel Sorting Leaving New Text Values at the Bottom
Question details
Newly added text values in Excel remain at the bottom of the list after sorting, instead of being arranged alphabetically with the existing text data.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Sorting a combined list of original data and newly appended entries.
- Observed behavior
- New text entries are ignored during the standard A-Z sort and stay at the end of the column, often due to mismatched formatting, hidden spaces, or non-printing characters.
Verify that your dataset contains no blank rows that might break the sorting range, and manually select the entire data range instead of clicking a single cell before sorting.
Clean Data Using TRIM and CLEAN Functions
Use built-in functions to remove hidden spaces and non-printing characters that prevent proper sorting.
Data imported from other sources or typed manually may contain hidden spaces or non-printable characters. These invisible characters cause Excel to evaluate the text differently, placing it out of expected alphabetical order.
Insert a new blank column directly next to the column containing the sorting issue.
In the first cell of the new column, type the formula =TRIM(CLEAN(A2)) (replace A2 with your target cell) and press Enter. Drag the fill handle down to apply this formula to all cells in the column.
Select the newly calculated cells, copy them, right-click the original column, and select 'Paste as Values' to overwrite the unformatted text.
Highlight your entire data range again, navigate to the Data tab, and click Sort A to Z.
Convert All Data to a Consistent Text Format
Force all cells to adopt a uniform Text format using the Text to Columns feature.
Effortlessly Sort and Clean Data with WPS Spreadsheet
WPS Office provides intuitive data sorting and cleaning tools that seamlessly handle mixed formats, ensuring your text and numerical data are organized correctly without complex troubleshooting.
- 1. Open Your Data File: Launch WPS Spreadsheet and open the file containing the misaligned data.
- 2. Select the Data Range: Click and drag to highlight all relevant rows and columns to ensure no appended entries are left out.
- 3. Standardize Formatting: Navigate to the Data tab and use the 'Text to Columns' or 'Format Cells' option to unify the data types.
- 4. Sort the Data: Click the Sort icon under the Data tab and choose Ascending (A-Z) to perfectly arrange your text values.

Frequently Asked Questions
Why do numbers stored as text sort differently than regular numbers?
Numbers stored as text are sorted character by character from left to right. Because of this, a text value like '11' will appear before '2', whereas true numbers are sorted logically by their mathematical value.
Will changing the cell format from General to Text fix sorting automatically?
No, simply changing the format via the Home tab dropdown does not immediately re-evaluate the cell contents. You usually need to double-click the cell and press Enter, or use the Text to Columns feature to force the update.
How do I ensure the spreadsheet sorts my entire dataset and doesn't leave new rows out?
Instead of selecting a single cell and relying on auto-detection, manually click and drag to highlight the entire range of data (or press Ctrl+A for contiguous data) before applying the sorting command.




