Search and display all cells that contain all search strings in excel
Jerome asks, in this blog post Search for multiple text strings in multiple cells in excel :
If the list of strings in column D was to increase to a large number e.g. 15, how would you tell excell to select the range of strings, so that you don't have to select each string "SEARCH($D$3" in the search parameter, as it seems is the case at the moment?
Now I finally have an answer.
Formula in F2:
copied down as far as necessary.
Named ranges
List (A2:A12)
Search_strings (D2:D3) Change this range if you want to include more search strings
What is named ranges?
How to implement array formula to your workbook
Change named ranges.
Download excel example file.
Search and display all cells that contain all search strings.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
ROW(reference) Returns the rownumber of a reference
ISERROR(value)
Checks whether a value is an error and returns TRUE or FALSE
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)
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
TRANSPOSE(array)
Converts a vertical range to a horizontal range, or vice versa.
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.
Related blog posts
- Search for multiple text strings in multiple cells in excel, part 2
- Search for multiple text strings in multiple cells and use in data validation in excel
- Search for multiple text strings in multiple cells in excel
- Search and display a range of values in excel
- Lookup with multiple criteria and display multiple search results using excel formula, part 2








July 26th, 2010 at 6:51 pm
Can you do this by displaying an adjacent column instead of the column that was searched?
July 27th, 2010 at 7:20 pm
if that is not possible then can you do this formula by having List (A2:A12) start at A3 and go to A13?
July 27th, 2010 at 8:32 pm
okay I figured it out! thanks and I love your site!!
September 23rd, 2010 at 7:12 pm
Man how long have you been working with excel?... i have just 2 years and I didn't have the slightest idea (till know ) you can do this only with formulas, I usually solve this kind of issues with VBA macros.
What can you recommend me to be able to do this? review each one of the formulas and its examples , or reading a lot of excel books or what?
September 26th, 2010 at 9:03 am
I have learned a lot just by starting an excel blog.
Review others formulas and reading books is a good start. Enjoy what you are doing and solutions come easily into mind.
October 19th, 2010 at 7:38 pm
Oscar,
Thanks again. Would you help me with replaced search string1 with replace string1 and search string2 with replace string2....etc.... thanks,
James