+ Reply to Thread
Results 1 to 6 of 6

Remove ALL Special Characters

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Remove ALL Special Characters

    Good day, Gurus.

    I receive workbooks containing data from several sources, and sometimes these workbooks contain non-visible or non-printable characters that i need to remove. I have the script below to remove "á", because I thought that was the only non-visible character in the workbooks, and to trim extra spaces from the beginning or the end. I am now finding that there are several different non-visible characters in some of the workbooks. Is there a way to modify the code below to include a wildcard to remove ANY and ALL special, non-visible or non-printable characters?

    Thanks in advance.

    Hutch

    Please Login or Register  to view this content.
    Last edited by [email protected]; 08-14-2013 at 05:47 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Remove ALL Special Characters

    Hi hutch, let me know if the following does anything for you:
    Please Login or Register  to view this content.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: Remove ALL Special Characters

    Thanks for the reply, Mordred.

    That removed some, but not all of the special characters.

    I have attached a sample worksheet that I am working on in hopes that will help.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: Remove ALL Special Characters

    I found that by running Mordred's macro twice, and then relacing spaces with "", all special characters in my sample were removed. Don't know why you had to run it twice, but apparently some characters can't be removed if they are adjacent to a space, and some spaces can't be removed if they are adjacent to a special character. I solved it by adding back the "trim" formula, and by repeating the macro twice. Not pretty, but seems to work.

    Thanks for your help, Mordred.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Remove ALL Special Characters

    I've had major issues with special characters in the past. I've also had to deal with extended ascii characters too.

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: Remove ALL Special Characters

    They can be a nightmare, and I've had little testing with the version above. So far I know it worked on just the sample I have posted here. I'm certainly open to any suggestions to improve it! If I run into problems I might have to reopen this thread.

    Thanks again, and have a good one.

+ 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. Macros to remove a special character and all the characters after that....
    By Umapathy kumar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2013, 01:27 AM
  2. [SOLVED] Remove special unicode characters from range
    By Trentos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2012, 12:23 PM
  3. Remove special characters
    By humacdeep in forum Excel General
    Replies: 6
    Last Post: 01-14-2012, 03:36 PM
  4. Remove Special Characters
    By bkatzman in forum Excel General
    Replies: 10
    Last Post: 04-13-2010, 11:51 AM
  5. Remove special characters from cell
    By jowilla442 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2009, 01:01 AM

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