How to sort in alphabetical order in Calc?

I’d like to sort data based on an alphanumeric code, but since it contains also numbers it seems to always sort them in numerical order. The result I need should i.e. look like this:

1
2
21
243
35
6
9
A5
B66
B679
...

How can I achieve this?
Setting cell formatting category to text doesn’t seem to work.

“When you need to modify the sort order of a data set, the most flexible and powerful way to do it is to add a column that contains a sort key computed from the data that you need to sort. Because you compute the sort key, you can produce (almost) any order you want.” (c) Joe Smith aka acknak In your case, probably the formula is quite similar to =TEXT(A2;"@")

Under Data → Sort ->Options check “Enable natural sort”.

that didn’t work for me.
edit - was cells didn’t change type from number to text without editing each one (Calc - How do you sort a list of numbers alphabetically? - #3 by codywohlers)