View Single Post
  #5   Report Post  
Tiziano
 
Posts: n/a
Default

Your solution works great, Aladin, except for a tiny
detail...

Say I am going to have a variable number of substrings
in Column C and thus I do not want to include a range
in terms of rows in the function, why does the following
not work?
=LOOKUP(COUNT(SEARCH(C:C,A1)),{0,1},{"","X"})

Am I stuck with something like this?
=LOOKUP(COUNT(SEARCH($C$1:$C$65536,A1)),{0,1},{"", "X"})



"Aladin Akyurek" wrote in message
...
B2:

=LOOKUP(COUNT(SEARCH($C$2:$C$3,A2)),{0,1},{"","X"} )

which you need to confirm with control+shift+enter (instead of just with
enter) and then copy down.

C2:C3 houses the search substrings of interest and A2 a target string.

Note. Replace SEARCH with FIND if the evaluation must be case-sensitive.

Tiziano wrote:
I would like to be able to search and flag a list of
string data based on another list of substring data.

If I have a list of strings in Column A and input the
list of substrings in Column C, I would like an "X"
to appear in Column B every time that a substring
mentioned in Column C is included in any of the
strings indicated in Column A. (There cannot be
multiple instances of the same substring, or a
combination of different substrings, in each string
of data in Column A.)

For instance, given the following information
indicated in Columns A and C, the "X" should appear
as indicated in Column B.

Thanks in advance for your help.

Column A Column B Column C
----------------- -------- ----------
A6520 04-02 X 6520 04-02
1511 03-01-VT X 1511 03-01
S6520 00
mtr-AAA-TR565
BC6520 04-02-01 X
D6520 00-ABC
8951511 03-01-VTM X