View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_5_] Stuart[_5_] is offline
external usenet poster
 
Posts: 413
Default Point Me. Searching strings for lists of keywords

Many thanks for that. I'm hoping to adapt the routine so as to
build 3 arrays to hold all found instances of the keywords,
and then to copy them to a new workbook.

Regards.

"J.E. McGimpsey" wrote in message
...
One way:

To put all the terms into one cell, replace the Do...Loop with:

Do
With rFound.Offset(0, 1)
.Value = IIf(IsEmpty(.Value), "", _
.Text & ", ") & vKeyWords(i)
End With
Set rFound = .FindNext(After:=rFound)
Loop Until rFound.Address = sFoundAddr

To put applicable terms into adjoining cells, replace the do loop
with:

Do
With rFound.Offset(0, 1).Resize(
1, UBound(vKeyWords))
.Item(Application.CountA(.Cells) + _
1).Value = vKeyWords(i)
End With
Set rFound = .FindNext(After:=rFound)
Loop Until rFound.Address = sFoundAddr

In article ,
"Stuart" wrote:

It would be of great help to me, if you could demonstate
the technique for the situation where multiple keywords
could exist within the same cell.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.548 / Virus Database: 341 - Release Date: 05/12/2003