Search for multiple text strings in multiple cells and use in data validation in excel
Question: can you please modify the function (f2:f11) to display the text strings in CELL G.. disregard the ROW NUMBER Display thnx
the function will be in data validation.. and it will display 2 outputs in the list
but if i put the array formula directly in the data validation list.. it only display "BFA" in the list.. i don't want to create a name range for the search result to display in data validation...

Question from this blog post: Search for multiple text strings in multiple cells in excel
Answer: I can´t create a data validation "drop down" list without using a "helper" column. But I can use a "custom" validation criteria.
Here is how to do it in excel 2007:
- Click "Data" in the ribbon
- Select a cell (A16 in this example)
- Click "Data validation"

- Select "Custom" in the "Allow:" drop down list
- Type this formula in "Formula:" field=SUM(IF(A16=IF(FREQUENCY(IF(ISERR(SEARCH(TRANSPOSE(Search_col), Text_col)), "", ROW(Text_col)-MIN(ROW(Text_col))+1), ROW(Text_col)-MIN(ROW(Text_col))+1)=ROWS(Search_col), Text_col, ), 1, 0))>0
- Click OK
A is not validated because it is not in the search results (F2:F3).
Named ranges
Text_col (A2:A12)
Search_col (D2:D3)
What is named ranges?
Download excel example file
Search-for-multiple-strings-in-multiple-cells2.xls
(Excel 97-2003 Workbook *.xls)
Functions in this article:
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
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
ROW(reference) Returns the rownumber of a reference
ROWS(array) returns the number of rows in a reference or an array
SMALL(array,k) Returns the k-th smallest row number in this data set.
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)
FREQUENCY(data_array, bins_array)
Calculates how often values occur within a range of values and then returns a vertical array of numbers having one more element than Bins_array.
TRANSPOSE(array)
Converts a vertical range to a horizontal range, or vice versa.
Related posts:
Search for multiple text strings in multiple cells in excel
Search for multiple text strings in multiple cells in excel, part 2
Search and display all cells that contain all search strings in excel



















Looks like something I would have made 15 years ago, when I was heavy into complex formulas. I like it!
Thanks Oscar,
Can I send you my workbook and see if you can help me with my problem? It’s almost finished, I’m so stuck with my Data validation problem. I very much appreciated you’re help. Please email me your email address so I can send it to you.
PIPO,
I would be more than happy to help you out but I have no solution.
I don´t think you can use an array formula in a data validation list (without using a "helper" column).
http://www.get-digital-help.com/contact/
Can you do this by displaying an adjacent column instead of the column that was searched?
never mind, not on with this formula, but this one--Filter unique distinct values where adjacent cells contain search string in excel-- using multiple search strings and displaying all values that have all the search strings.