On Oct 15, 8:06*pm, Ron Rosenfeld <r...@nospam.net> wrote:
> On Fri, 15 Oct 2010 13:52:30 -0700 (PDT), Ahreum
>
>
>
> <ahreum.sk...@gmail.com> wrote:
> >Hi:
>
> >I need a loopingmacrothat goes through a column to find strings that
> >contain certainwords.
>
> >For example) Column G contains alistof person and business names,
> >and I'd like to identify records that contain thewords,
> >"corporation," "technology," "furniture," "financial," "supermarket,"
> >etc., all at once. Since Column G has thousands and thousands of rows,
> >I can't run a query for each word -- so it's really important that I
> >can specify many differentwordson query run.
>
> >When a match is found (let's say cell G5), then the corresponding H
> >column (cell H5) will have a "1" or some other distinction for the
> >match.
>
> >Thanks!
>
> You can do this without amacro. *For example:
>
> H1:
> =OR(ISNUMBER(SEARCH({"corporation","technology","furniture","financial","supermarket"},G1)))
> will return TRUE if any of thewordsin thelistare in G1, and FALSE
> if not.
>
> You could use this in an IF statement to flag the positives however
> you like. *Or you could use it in a conditional formatting equation to
> highlight the cells with those values.
Thanks Ron!
Made some little adjustments, and it works great!
I use the =isnumber(search()) function all the time, but I didn't
realize you can specify more than one word.
Anyway, here it is for anyone who'd like to see:
=OR(ISNUMBER(SEARCH({"*corp*","*tech*","*f
urniture*","*finan*","*market*"},A2)))
|