Question: How do I create a unique distinct list where adjacent cell values contains a search string?

AA102 CA
AA103 BC
AA104 CA
AD103 SD
AA201 CC

Search string: 1

Unique distinct list
CA
BC
SD

Answer:

Filter unique distinct values

Filter unique distinct values where adjacent cells contain search string

Array formula in C12:

=INDEX(Column_txt, MATCH(0, COUNTIF($C$11:C11, Column_txt)*(SEARCH($C$8, Search_column)), 0)) + CTRL + SHIFT + ENTER

copied down as far as needed.

Named ranges

Column_txt (C2:C6)
Search_column (B2:B6)
What is named ranges?

How to implement array formula to your workbook

Change the named ranges. If your list starts at, for example, F3. Change $C$11:C11  to F2:$F$2, in the above formulas.

Download excel file for this tutorial.

Filter unique distinct values where adjacent cells contain a search string.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

MATCH(lookup_value;lookup_array; [match_type] Returns the relative position of an item in an array that matches a specified value

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

SEARCH() Returns the number of the character at which a specific character or text string is first found, reading left to right (not case sensitive)