+ Reply to Thread
Results 1 to 4 of 4

Remove special unicode characters from range

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Remove special unicode characters from range

    Hello all.

    Working with MS Excel 07 and VB.

    In the attached workbook I have populated column A with a list of names I've retrieved from a gaming forum i use. The simplified Chinese symbols you see beside each name represent different achievements those players have achieved. There is a total of two symbols used. Below are the symbols and their Unicodes.

    1. 庙 (U+5E99)
    2. 畜 (U+755C)

    Some cells have both symbols while others have just one. Where symbol pairs occur, I cannot guarantee they're always in the same order.
    I want to remove these symbols from all occupied cells in column A so i can use each cell's value for further procedures without problems.
    I've seen other people use the "regular expression" function to eliminate or replace characters or specified strings with success. Also from what I've read it looks like the only way to do this properly is with use of the Unicodes I've provided.

    I'd appreciate it if someone could help me write some code to do this.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Remove special unicode characters from range

    try this, copied down...

    =SUBSTITUTE(SUBSTITUTE(A2,"畜",""),"庙","")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Remove special unicode characters from range

    Thank you very much FDibbins!

    Had to modify to:
    =SUBSTITUTE(SUBSTITUTE(A:A,"畜",""),"庙","")

    Now it works on all cells down the column. Much easier than I was expecting.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Remove special unicode characters from range

    happy to help and thx for the rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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