Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Substituting characters etc (Excel 2003)

    Good morning...I am attaching a small sample w/book....there is an explanation of the problem inside it...basically, I am trying to get some formulae that will substitute characters (eg: ABC(1) to ABC)....I have tried a series of combinations of IF, REPLACE, SUBSTITUTE but always come up with #VALUE.....there are 35 'parent' codes (ABC, EAX, PRT) and 4 or 5 'child' codes (eg: ABC(1), EAX(1))....I need to be able to remove the (1) whenever it appears and change the 'child' code to the 'parent' code.....thank you
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Substituting characters etc (Excel 2003)

    Try this:
    <code>=SUBSTITUTE(C5,"(1)","")</code>

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Substituting characters etc (Excel 2003)

    How about:
    =SUBSTITUTE(C5,"(1)","")

    And copy/autofill it down the column

    Steve

  4. #4
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Substituting characters etc (Excel 2003)

    Thank you...amazingly simple, compared to the long stuff I was concocting....thank you.

  5. #5
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Substituting characters etc (Excel 2003)

    Thank you...amazingly simple, compared to the long stuff I was concocting....thank you Steve

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Substituting characters etc (Excel 2003)

    If the codes are always 3 characters, then you could also use:

    <code>
    =LEFT(C5,3)
    </code>

    This would also work with "(2)", etc.
    Legare Coleman

  7. #7
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Substituting characters etc (Excel 2003)

    Thank you Legare....all information worth keeping in mind ....I like the fact that it works with other formats as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •