+ Reply to Thread
Results 1 to 9 of 9

Remove special characters using VBA

  1. #1
    Registered User
    Join Date
    12-08-2016
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    5

    Remove special characters using VBA

    Hi Guys,

    I am facing problem with the special characters in excel files, we dont want any special characters in our data files, right now i am doing it by manual replace function.

    I need a VBA code for replacing special characters.

    ~Ran

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,503

    Re: Remove special characters using VBA

    How are you doing it manually?

  3. #3
    Registered User
    Join Date
    12-08-2016
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    5

    Re: Remove special characters using VBA

    Hey, thanks for your reply.

    Currently i am doing it by using Find & Replace function (Control + H) for each character.

    Please help me with the VBA code so that my work goes easy..

    ~Ran

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,503

    Re: Remove special characters using VBA

    I was hoping your answer would give some indication of what special characters you were trying to remove.

  5. #5
    Registered User
    Join Date
    12-08-2016
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    5

    Re: Remove special characters using VBA

    Hi,

    These are the special characters i need to replace to the normal one.

    à,á,å,â,ã,ä,ç,è,é,ê,ë,ì,í,î,ï,ñ,ò,ó,ô,õ,ö,š,ù,ú,û,ü,ý,ÿ,ž,ß

    ~Ran

  6. #6
    Registered User
    Join Date
    12-08-2016
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    5

    Re: Remove special characters using VBA

    Hi,

    These are the special characters i need to replace to the normal one.

    à,á,å,â,ã,ä,ç,è,é,ê,ë,ì,í,î,ï,ñ,ò,ó,ô,õ,ö,š,ù,ú,û,ü,ý,ÿ,ž,ß

    ~Ran

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,939

    Re: Remove special characters using VBA

    There are a few other characters you might also not want to have in a file name like forward and back slashes.

    I think the following code will do it for you. It can be used as a formula on the spreadsheet or in code.
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,939

    Re: Remove special characters using VBA

    I just re-read the requirement. You are not going for a file name. So some of the characters I am eliminating, you might want to keep. In that case, change the Arrays to:
    Please Login or Register  to view this content.
    And remove the following
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-08-2016
    Location
    Pune
    MS-Off Ver
    2013
    Posts
    5

    Re: Remove special characters using VBA

    Thank you so much dflak for you help...

+ 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. [SOLVED] How to remove Trailing Special Characters
    By dsokua in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-20-2016, 08:13 AM
  2. Remove special characters from a column
    By protcg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-02-2015, 03:28 PM
  3. [SOLVED] how remove all special characters except # , & - .
    By Latha Mani in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-13-2014, 07:14 AM
  4. [SOLVED] Remove ALL Special Characters
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2013, 08:12 PM
  5. Remove special characters
    By humacdeep in forum Excel General
    Replies: 6
    Last Post: 01-14-2012, 03:36 PM
  6. Remove Special Characters
    By bkatzman in forum Excel General
    Replies: 10
    Last Post: 04-13-2010, 11:51 AM
  7. 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