+ Reply to Thread
Results 1 to 10 of 10

Case sensitive sorting with German Umlauts

  1. #1
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Case sensitive sorting with German Umlauts

    Hi,

    I am trying to sort data in alphabetical order with uppercase, or lowercase (don't care which), taking precedence over the alphabetical sort. So if I have a list like this:

    überbieten
    Überbeschäftigung
    überbesetzt
    überaus
    Überbezahlung
    Übelkeit
    überall

    I want to sort it like this:

    überall
    überaus
    überbesetzt
    überbieten
    Übelkeit
    Überbeschäftigung
    Überbezahlung

    I tried the case sensitive sort in the Data tab, Sort & Filter Group, but it won't pay any attention to words starting with an umlaut like this. In fact it doesn't seem to pay any attention to case at all, whether I use an umlaut or not. Does anyone have any ideas how to handle this? I'm using MS Office Professional Plus 2013.

    Thank you

    Paul

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Case sensitive sorting with German Umlauts

    A bit of a workaround..Try this

    - Select your list
    - Find & replace (Ctrl+H) -- Find ü -- Replace 1 -- Check the 'Match case' checkbox -- Replace All
    - Sort your list (ascending or descending)
    - Find & Replace (Ctrl+H) -- Find 1 -- Replace ü -- Replace All

    Not ideal, but hope that helps
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Case sensitive sorting with German Umlauts

    UDF?

    Row\Col
    A
    B
    C
    1
    Input
    Sort
    2
    überbieten FC62657262696574656E B2: =Str2Asc(A2)
    3
    Überbeschäftigung DC6265726265736368E466746967756E67
    4
    überbesetzt FC62657262657365747A74
    5
    überaus FC626572617573
    6
    Überbezahlung DC62657262657A61686C756E67
    7
    Übelkeit DC62656C6B656974
    8
    überall FC626572616C6C


    Sort by the Sort column:

    Row\Col
    A
    B
    1
    Input
    Sort
    2
    Übelkeit DC62656C6B656974
    3
    Überbeschäftigung DC6265726265736368E466746967756E67
    4
    Überbezahlung DC62657262657A61686C756E67
    5
    überall FC626572616C6C
    6
    überaus FC626572617573
    7
    überbesetzt FC62657262657365747A74
    8
    überbieten FC62657262696574656E


    Please Login or Register  to view this content.
    Last edited by shg; 10-19-2014 at 03:57 PM.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Case sensitive sorting with German Umlauts

    In shg's solution, you could use in Cell B2 (if you do not want to pursue the UDF option)

    =TRIM(CODE(LEFT(A2))&MID(A2,2,LEN(A2)))

  5. #5
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Re: Case sensitive sorting with German Umlauts

    Thank you... bit of a workaround but it would help. Good idea.

    Thanks

    Quote Originally Posted by Ace_XL View Post
    A bit of a workaround..Try this

    - Select your list
    - Find & replace (Ctrl+H) -- Find ü -- Replace 1 -- Check the 'Match case' checkbox -- Replace All
    - Sort your list (ascending or descending)
    - Find & Replace (Ctrl+H) -- Find 1 -- Replace ü -- Replace All

    Not ideal, but hope that helps
    Last edited by filky; 10-20-2014 at 06:05 PM.

  6. #6
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Re: Case sensitive sorting with German Umlauts

    Quote Originally Posted by shg View Post
    UDF?
    Thank you... looks interesting but possibly a little tricky for my usecase.

  7. #7
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Re: Case sensitive sorting with German Umlauts

    Quote Originally Posted by Ace_XL View Post
    In shg's solution, you could use in Cell B2 (if you do not want to pursue the UDF option)

    =TRIM(CODE(LEFT(A2))&MID(A2,2,LEN(A2)))
    Quote Originally Posted by Ace_XL View Post
    In shg's solution, you could use in Cell B2 (if you do not want to pursue the UDF option)

    =TRIM(CODE(LEFT(A2))&MID(A2,2,LEN(A2)))
    Hi, this was interesting. But I didn't give you the full picture. The words in my list are scattered all over, so with this method I'd like to apply the formulae against every word and then sort the column. But this won't work as the codes generated by the diacritics are not sequential with the rest. So I get this kind of result which messes with the sorting.

    r 114
    s 115
    t 116
    u 117
    ü 252
    Ü 220
    v 118
    w 119
    x 120

    I suppose I could do a double sort and group all the ü's and Ü's together and then just sort these. But your first idea would probably be easier. I'm very surprised to find this problem in the first place. But you have all given me some good ideas.

    Thank you for your help. Much appreciated.

    Regards

    Paul

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Case sensitive sorting with German Umlauts

    Sorting in Excel is surprisingly nuanced.

    If you wanted a particular sort order (including case) that Excel doesn't support, you could pass that as a string to a UDF and get exactly what you want.

  9. #9
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Re: Case sensitive sorting with German Umlauts

    Quote Originally Posted by shg View Post
    Sorting in Excel is surprisingly nuanced.

    If you wanted a particular sort order (including case) that Excel doesn't support, you could pass that as a string to a UDF and get exactly what you want.
    Thanks SHG. I have run your code and it does a fantastic job on the umlauts. But doesn't handle other letters correctly and I have no idea how to adapt the code to fix this. So I could use this on the umlauts only and case sensitive differences, but not on the whole column for all letters.

    For example, here the "a" and "w" are moved to the end or the start depending on which way you sort... but the values created don't allow sorting as required:

    German English Sort
    überängstlich overanxious FC626572E46E6773746C696368
    überblättern skip over FC626572626CE4747465726E
    Übeltäter culprit DC62656C74E4746572
    Übelsein nausea DC62656C7365696E
    Übelkeit nausea DC62656C6B656974
    wasser water 776173736572
    apfel apple 617066656

    Clever idea though.

    Thank you

    Paul

  10. #10
    Registered User
    Join Date
    07-15-2004
    Location
    Göttingen, Germany
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    60

    Re: Case sensitive sorting with German Umlauts

    Quote Originally Posted by shg View Post
    Sorting in Excel is surprisingly nuanced.

    If you wanted a particular sort order (including case) that Excel doesn't support, you could pass that as a string to a UDF and get exactly what you want.
    Thanks SHG. I have run your code and it does a fantastic job on the umlauts. But doesn't handle other letters correctly and I have no idea how to adapt the code to fix this. So I could use this on the umlauts only and case sensitive differences, but not on the whole column for all letters.

    For example, here the "a" and "w" are moved to the end or the start depending on which way you sort... but the values created don't allow sorting as required:

    German English Sort
    überängstlich overanxious FC626572E46E6773746C696368
    überblättern skip over FC626572626CE4747465726E
    Übeltäter culprit DC62656C74E4746572
    Übelsein nausea DC62656C7365696E
    Übelkeit nausea DC62656C6B656974
    wasser water 776173736572
    apfel apple 617066656

    Clever idea though.

    Thank you

    Paul

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 01-11-2016, 05:23 AM
  2. [SOLVED] SUMPRODUCT Or SUMIF - In case of Case sensitive???
    By lifeisaspreadsheet in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2012, 07:57 AM
  3. Case sensitive sorting
    By hmmmmm in forum Excel General
    Replies: 15
    Last Post: 06-12-2009, 02:48 AM
  4. Excel 2003 can't do case sensitive sorting!
    By TelcordiaJack in forum Excel General
    Replies: 1
    Last Post: 05-03-2006, 03:10 PM
  5. .Name case sensitive
    By CinqueTerra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2006, 05:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1