If most of the data in an Excel spreadsheet is text, and each cell has a different length of content, it may look untidy on the whole. For this situation, you can sort these cells by the number of characters.
But as you know, there’s no such an existing sorting rule to use directly. Before sorting, you should count the characters number in each cell first.
1. Create a new column aside and name it as you like.
2. Input the formula: =LEN(B2) in C2 to count the characters number of the text in B2.
3. Press [Enter] key to see the result.
4. Useto apply the formula to other cells.
5. Click any cell in the table. Go to Data tab and click the AZ icon (which is Sort Smallest to Largest).
6. Or you can click Sort and choose to Sort by Characters (header of column C) in the Order from A to Z.
7. Then the data in the table will be re-sorted by the values in column C (also the character numbers of column B) from smallest to largest.