A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Sorting with words that contain special characters are often not supported by Excel, or also depend on the sorting method of your operating system... if your region settings allow different sorting methods.
The (to me) most known problem comes from German where we have the character ß which can also be written as ss.
In English we have the word sauce (in the sense of gravy, I guess sås in Swedish), which actually comes from French. The same word in German in Soße, but if you life in the nearby or in Switzerland you can also write Sosse. All this words means the same delicious juice. :-) Whatever, let us write this 2 German words into Excel and sort it AZ and ZA and see what happens:
Absolutely nothing!
That problem is not inside Excel, it's inside the OS. When sorting, the individual characters are assigned a value and ultimately sorted according to these numbers.
If we add a VBA code we can make this values visible (in hexadecimal notation).
Function HexCode(ByVal Expression As String) As String
Dim i As Long
For i = 1 To Len(Expression)
HexCode = HexCode & Right$("00" & Hex(AscW(Mid$(Expression, i, 1))), 4)
Next
End Function
B1: =HexCode(A1)
That's the reason why Ä is sorted before Å. And there is no way to change the behavior, if you want a different sorting you either have to use helper routines similar to mine and sort by the helper column or write your own sorting routines.
Andreas.