+ Reply to Thread
Results 1 to 8 of 8

Replace Special Characters with Space

  1. #1
    Registered User
    Join Date
    05-11-2016
    Location
    Mumbai, INDIA
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    21

    Replace Special Characters with Space

    While uploading an excel file, special characters like . / - etc. are not allowed / gives error.

    So these special characters need to be replaced with a blank space (as seen in attached sample sheet)

    Possible to do this with CONCATENATE or any OTHER FORMULA ?
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Replace Special Characters with Space

    Please provide a list of ALL special characters you want replaced. thx

  3. #3
    Registered User
    Join Date
    12-27-2022
    Location
    brazil
    MS-Off Ver
    2016
    Posts
    14

    Re: Replace Special Characters with Space

    "The formula would look like this

    =SUBSTITUTE(SUBSTITUTE(C2,"/"," "),"-"," ")

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

    Re: Replace Special Characters with Space

    I did this with a VBA formula. The formula is GoodFileName and it takes two arguments: =GoodFileName(StringName, What to replace with).

    For example: =GoodFileName("08/01/2023", " ") = 08 01 2023 while = GoodFileName ("08/01/2023","_") = 08_01_2023.

    You can also accomplish the same thing using multiply nested SUBSITUTE commands using the CHAR() functions for unprintable characters.
    Attached Files Attached Files
    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.

  5. #5
    Registered User
    Join Date
    05-11-2016
    Location
    Mumbai, INDIA
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    21

    Re: Replace Special Characters with Space

    Thanks for your quick response.

    Just 2 special characters viz. / -

  6. #6
    Registered User
    Join Date
    05-11-2016
    Location
    Mumbai, INDIA
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    21

    Re: Replace Special Characters with Space

    Thanks but I do not know VBA

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Replace Special Characters with Space

    Post #3???
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    05-11-2016
    Location
    Mumbai, INDIA
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    21

    Re: Replace Special Characters with Space

    Thanks a lot for the formula. It solved the problem. Many thanks once again.

+ 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] Find and Replace Macro to replace list of special characters
    By dcowiesmith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-22-2021, 02:01 PM
  2. [SOLVED] Replace non alpha and numberic characters with space
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2018, 08:13 AM
  3. find and replace special characters
    By irfanparbatani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2015, 09:30 PM
  4. [SOLVED] Replace special characters with Space
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2014, 11:38 AM
  5. [SOLVED] To find the Special charcter and space of the file names and replace with the underscore
    By laxmanann in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-14-2014, 09:31 AM
  6. search and replace special characters
    By jmhultin in forum Excel General
    Replies: 2
    Last Post: 10-14-2009, 12:07 PM
  7. How do I find replace special characters?
    By zzapper in forum Excel General
    Replies: 1
    Last Post: 06-27-2005, 02:05 PM

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