+ Reply to Thread
Results 1 to 7 of 7

Remove Specific Characters From Text Cell

  1. #1
    Registered User
    Join Date
    08-31-2006
    Posts
    25

    Remove Specific Characters From Text Cell

    I would like to create a formula that removes a specific character if it appears in a cell. In this case, if the text in the name cell starts with * or #, remove it. Otherwise, keep the contents intact. Examples:

    Please Login or Register  to view this content.
    Is there a formula that will get me where I want to be?

    Thanks!

    Chuck
    Last edited by chasfh; 04-23-2010 at 11:08 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Remove Specific Characters From Text Cell

    Try

    =Substitute(Substitute(A1,"*",""),"#","")

    you can nest up to 7 of these functions in Xl2003 or earlier
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003, 2007, 2010 & 2013
    Posts
    18,391

    Re: Remove Specific Characters From Text Cell

    If you are not concerned where within the string the characters appear then

    =SUBSTITUTE(SUBSTITUTE(A2,"*",""),"#","")

    If you are then,

    =IF(OR(LEFT(A2,1)="*",LEFT(A2,1)="#"),MID(A2,2,LEN(A2)),A2)
    Last edited by Andy Pope; 04-19-2010 at 10:10 AM.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    08-31-2006
    Posts
    25

    Re: Remove Specific Characters From Text Cell

    Works perfectly! Thanks!

  5. #5
    Registered User
    Join Date
    02-23-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Remove Specific Characters From Text Cell

    Please use this Formula for Special Characters: f5 ur column
    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F5," ",""),".",""),"%",""),"$",""),"#",""),"*",""),"/",""),")",""),"(","")

  6. #6
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Remove Specific Characters From Text Cell

    What if the specific character is "

  7. #7
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Canada
    MS-Off Ver
    Office 2013
    Posts
    120

    Re: Remove Specific Characters From Text Cell

    Quote Originally Posted by vraj198 View Post
    What if the specific character is "
    CHAR(34) is the double quotes, so you could do something like this:
    =SUBSTITUTE(A10,CHAR(34),"")

+ 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