Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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" wrote in message
oups.com...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Remove ' if not followed by two digits

Will smarties never cease to amaze me?

Thank you for your help - you're awesome.

-tom

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove all but the last seven digits in a cell Gary Crisp Excel Discussion (Misc queries) 10 February 12th 08 07:59 PM
Formula amendment to not remove digits Sarah (OGI) Excel Worksheet Functions 3 August 20th 07 04:42 PM
Remove first few digits from all cells in the column Magwine Excel Worksheet Functions 7 August 2nd 07 10:39 PM
remove and replace digits from a number spreadsheet monkey Excel Worksheet Functions 3 April 20th 07 02:08 PM
Excel 2002 : How to remove the digits from original reference ? Mr. Low Excel Discussion (Misc queries) 6 April 13th 07 02:04 PM


All times are GMT +1. The time now is 04:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"