View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Extracting word from phrase within column

Sorry Ron - my question was for the OP. It was unclear how this was to be
handled.
I was a little behind you with my regex post: yours is much more concise...

Cheers
Tim

"Ron Rosenfeld" wrote in message
...
On Tue, 28 Mar 2006 20:33:32 -0800, "Tim Williams" <timjwilliams at gmail
dot
com wrote:

What if a cell has 1 D word?

Tim


No problem.

That's the reason for the REGEX.COUNT function.

Note that the 'i' argument in the REGEX.MID function is for the instance
of the
occurrence.

Note also that the If...Then in the middle is superfluous. It was
present in
an earlier version, but checking the number of words with the COUNT
function
eliminated the requirement to test the output; as the entire cell will be
skipped if there is no D word.
--ron