+ Reply to Thread
Results 1 to 7 of 7

Delete specific characters from right side of string

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    Ft. Worth, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Delete specific characters from right side of string

    I know there are threads on this, I just keep coming up short. Here goes:
    If cell A2 has a word that and that word end in "cn", I need to return the word without "cn". If there is a word without "cn", I need to return the full value of the word.
    Example 1: ATPCN returns ATP
    Example 2: XYZ1 returns XYZ1
    Example 3: ACND returns ACND

    Hope my examples help. Any assistance is greatly appreciated. Many thanks!

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Delete specific characters from right side of string

    Assuming your string is in A2, then try this...

    Please Login or Register  to view this content.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    06-06-2013
    Location
    Ft. Worth, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Delete specific characters from right side of string

    Yes, that works great thanks! Last enhancement if possible. After each string, whether or not "CN" has been deleted, I need to add "Equity Ticker" fight after the original word. Is it possible to do in same line or do I need to add a new column and add that in the next column? Thanks again!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Delete specific characters from right side of string

    That's easily done by using htis modification of sktneer's formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    06-06-2013
    Location
    Ft. Worth, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Delete specific characters from right side of string

    Thank you! I had it on the wrong side of the ). Thanks for all your help!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Delete specific characters from right side of string

    OK!! If that's it, can you mark the thread a solved and preferably sau thanks to those who helpedby clickino the Add Reputation button at the foot of their post(s)?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Delete specific characters from right side of string

    Thanks for that!

+ 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. delete last 5 characters from string
    By leooconnor in forum Excel General
    Replies: 6
    Last Post: 01-02-2015, 08:50 PM
  2. [SOLVED] Macro to create a new line within a text string if specific characters appear mid-string
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2014, 11:32 AM
  3. Replies: 7
    Last Post: 07-25-2014, 08:21 AM
  4. Replies: 4
    Last Post: 10-17-2011, 03:07 PM
  5. Replies: 4
    Last Post: 12-08-2010, 01:28 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