+ Reply to Thread
Results 1 to 3 of 3

Remove ' if not followed by two digits

  1. #1
    tom
    Guest

    Remove ' if not followed by two digits

    Hi -

    I'd like a quick formula that will remove an apostrophe if the
    apostrophe is not followed by two digits. Ex:

    Original Desired Result
    Abe '89 Abe '89
    Bye '88 Bye '88
    Chie ' Chie
    Lead '64 Lead '64
    Foloow ' Foloow

    What is the quickest way to do this? I'm struggling with
    =LEFT(A2,FIND("'",A2) . . .


    Thanks for your help.

    -Tom


  2. #2
    Bernie Deitrick
    Guest

    Re: Remove ' if not followed by two digits

    Tom,

    For a value in cell A1:

    =IF(ISERROR(VALUE(MID(A1,FIND("'",A1)+1,2))),TRIM(SUBSTITUTE(A1,"'","")),A1)

    HTH,
    Bernie
    MS Excel MVP


    "tom" <[email protected]> wrote in message
    news:[email protected]...
    > Hi -
    >
    > I'd like a quick formula that will remove an apostrophe if the
    > apostrophe is not followed by two digits. Ex:
    >
    > Original Desired Result
    > Abe '89 Abe '89
    > Bye '88 Bye '88
    > Chie ' Chie
    > Lead '64 Lead '64
    > Foloow ' Foloow
    >
    > What is the quickest way to do this? I'm struggling with
    > =LEFT(A2,FIND("'",A2) . . .
    >
    >
    > Thanks for your help.
    >
    > -Tom
    >




  3. #3
    tom
    Guest

    Re: Remove ' if not followed by two digits

    Will smarties never cease to amaze me?

    Thank you for your help - you're awesome.

    -tom


+ 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