+ Reply to Thread
Results 1 to 4 of 4

How to keep hyphen in a string and remove all specific characters

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    How to keep hyphen in a string and remove all specific characters

    Hi All,

    I have a column with so many names and want to remove all specific characters from each name/cell.

    I tried with below codes, which are available at below link, but this trick also removes hyphen sign from the names:
    http://www.ozgrid.com/forum/showthread.php?t=55082

    Please Login or Register  to view this content.
    I don't know if my logic is the same as yours, that is, if we find "-" (hyphen) sign in a string, and that sign has any alphabet character before and after, so it can be good to go.
    I am looking for your help.

    Examples:
    "Amparo Dablo-Victoria121" should be as "Amparo Dablo-Victoria" name.
    "Robert Kearney (07-15-1986)" should be as "Robert Kearney"
    "James *Bond III" should be as "James Bond III"


    Thanks in Advance!
    Last edited by SunOffice; 11-20-2013 at 03:47 AM.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

  2. #2
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: How to keep hyphen in a string and remove all specific characters

    This should probably handle all of the names in your column. It's not elegant... but it works.
    The code assumes the names are in column 1 and writes the new name in column 2. Edit as needed.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: How to keep hyphen in a string and remove all specific characters

    Thank you so much Ed_Collins!!
    It's very good!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: How to keep hyphen in a string and remove all specific characters

    Another one
    Please Login or Register  to view this content.

+ 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] VBA Remove First 10 Characters From string
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2013, 08:22 AM
  2. Want to Remove A Non-Specific Text Strand Between Two Specific Characters
    By predictablepanda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2013, 12:33 AM
  3. [SOLVED] Remove certain characters from the end of a string only
    By mini_dutch28 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-20-2012, 01:04 PM
  4. Remove characters in a string.
    By jncswe in forum Excel General
    Replies: 2
    Last Post: 09-10-2010, 07:26 AM
  5. Remove Characters From Right of String
    By milagros in forum Excel General
    Replies: 11
    Last Post: 12-26-2009, 12:01 PM

Tags for this Thread

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