View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.newusers
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Extracting a word form a text string

The person I responded to advised using <spaceTEST<space as the Find
string, not just TEST by itself in order to get to the word TEST as a
stand-alone word and not imbedded within other text (such as TESTING,
INTESTATE, etc... I was just pointing out those surrounding spaces were not
sufficient to do that. The word TEXT was a mistype of the word TEST.

--
Rick (MVP - Excel)


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Your first two examples had the word TEST removed using EditReplace.

The third example with the word TEXT was not replaced.

What are you getting at?


Gord Dibben MS Excel MVP

On Tue, 20 Oct 2009 17:10:26 -0400, "Rick Rothstein"
wrote:

That won't necessarily work all the time. Consider text strings like the
following...

"Consider this location for TEST, it won't be replaced."

"This text (with the word TEST) won't work either."

"Do you think the replacement will happen here for TEXT?"

and so on...

I think a VB macro, probably using Regular Expressions, will be necessary
to
handle this.