Kerubu wrote:I want to order by the number part first
That statement isn't clear to me. Let's consider "9AB" and "12CD". If we "order by the number part", is 9 before 12 (because 9 is less than 12) or is 12 before 9 (because the character "1" sorts before "9")? None of the examples provided distinguish between these situations.
If numbers are to be ordered by their characters (12 before 9), then what has been discussed so far will work. Otherwise we need to right justify the numeric characters before sorting them. It's easiest if you know, and I presume you do, the maximum number of digits in a number. I'm going to assume this is eight. If numbers are to sort numerically, then we can use as sort keys "00000009AB" and "00000012CD", and 9AB will sort before 12CD. The attached example shows the functions needed to generate these keys.
OpenOffice 3.2.0 Build 9483 on Mac OS X 10.6.8. The locale for any menus or Calc formulas in my posts is English (USA).