View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default eliminating text between two specific characters

I'm getting old; there *must* be a simpler way.

Anyway:

=IF(OR(ISERROR(IF(ISERROR(FIND("+",A1)),0,FIND("+" ,A1))),FIND(".",A1)=IF(ISERROR(FIND("+",A1)),0,FI ND("+",A1))),A1,LEFT(A1,FIND(".",A1)-1)&RIGHT(A1,LEN(A1)-IF(ISERROR(FIND("+",A1)),0,FIND("+",A1))+1))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Garbunkel" wrote in message ...
| All,
|
| I am extracting a certain column of data from an Excel file
| (a .
| Unfortunately, some of the data was entered incorrectly
| (i.e. there should not be any data present in-between
| a '.' and a '+', nor should there be any occurence of a '.'
| before a '+'
| Example: 282_994.01+282_995.01
| needs to be changed to 282_994+282_995.01
|
| A hard-coded find & replace will not work because there
| are so many different offending text strings. What I
| simply want to do is find any occurence of a '.'
| before a '+' and eliminate all text from the '.' up to
| (but not including) the '+'.
|
| Any help is much appreciated.
|
| Thanks!
| --
|