Remove ' if not followed by two digits

T

tom

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
 
B

Bernie Deitrick

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
 
T

tom

Will smarties never cease to amaze me?

Thank you for your help - you're awesome.

-tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top