Forum Discussion
Improper sorting of text using custom sort list
mathetes I'm not sure what is wrong with the file? Opens fine for me. I attached it again and also as .xls file.
I'm not sure either. If you go back and look at the original, you'll see that its size is given as 1KB, a fraction of these most recent.
HOWEVER, even your most recent generate this error message when I try to download them.
- SergeiBaklanDec 04, 2020Diamond Contributor
Total length on the list as SUM(LEN(range)) is about 2000 characters, includes invisible characters between items. Last items in your range are not in the list, you may check in dialogue box. Thus they are sorted wrongly. The workaround is to create helper column to the right of your list like 1,2,3,4,... and sort on it.
All details are here Custom List Limits - Excel Tips - MrExcel Publishing
- poholekcDec 05, 2020Copper Contributor
SergeiBaklan This is genius. Thank you! Will choose shorter labels in the future to avoid the extra characters.
- mathetesDec 04, 2020Gold Contributor
Whew... finally!
Is this in the order you wanted? I created two helper columns, taking apart the text at the space, creating a column on text only and a column of the numbers, sorting the latter as numbers, not as text.