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)

  • Share/Bookmark

Related posts:

  1. Filter unique distinct list sorted based on sum of adjacent values using array formula in excel
  2. Filter unique distinct text values in a range using “contain” condition in excel
  3. Filter unique distinct values from two ranges combined in excel 2007
  4. Filter unique distinct text values using “begins with” criterion in a range using array formula in excel
  5. Search and display all cells that contain all search strings in excel
  6. Search for a text string in an excel table
  7. Filter unique text values in a range using “contain” condition in excel
  8. Filter unique distinct values using “contain” condition of a column in excel
  9. Create unique distinct list from column where an adjacent column meets criteria
  10. Filter unique values from a range using array formula in excel