Notice that it does the Exact same thing for numbers:
Week 1
Week 2
Week 3
Which is also fine, until you start getting into double digits.
Week 1
Week 10
Week 11
---
Week 15
Week 2
Week 3
1, 2, 3 ... 15 are not being processes as numbers, instead the characters themselves are being compared. Since the 1 is the fifth (or sixth if you count the space) character, it will compare the character '1' to the character '2', see that 1 comes first, and not look at the rest of the word. This causes Week 10 to come before Week
The quickest and easiest way to fix this is by adjusting your numbers. Use Week 01 and Week 02 as your labels. Then every week that starts with a 0, will come before every week that starts with a 1 in the digit, displaying as follows. (Note, this will work for up to 99 numbers, which is more than plenty for this class).
Week 01
Week 02
Week 02
---
Week 09
Week 10
Week 11
Did I go into to much details? I have no idea how familiar you guys are with stuff like this, so I tried to format this post in such a way that even people without any technology background can understand why the labels won't sort correctly. I will answer any questions in the comments, and feel free to drop random tech questions.
![]() |
| Enjoy the nerdy glasses from Pixabay |

Carmen, just to say THANK YOU for this! Just think how convenient it would be if we used hexadecimal. It would cope with the 15-week semester so nicely! I'm out of town this weekend, but the next weekend, I need to try to write some new tech tips including this one!
ReplyDeleteHere's a fun alphabetizing fact for you: one of the first books in the world that was organized alphabetically was Aesop's fables in ancient Greek. They did not have a full understanding of alphabetizing as we do, but they did organize the fables based on A-B-C-D (well, the Greek equivalents), so the fables with eagles and foxes come first because both eagle and fox start with A in Greek. :-)