Lookup with multiple criteria and display multiple search results using excel formula, part 4
Question: I second G's question: can this be done for more than 3?
i.e.
(Instead of last name, middle, first)
customer#, cust name, appt date, appt time, venue, coordinator, assistant
A question asked in this post:
Lookup with multiple criteria and display multiple search results using excel formula, part 3
Answer:
Array formula in B25:
Formula in C25:
Formula in D25:
Formula in E25:
Formula in F25:
Formula in G25:
Formula in H25:
Formula in I25:
Named ranges
Customer (B3:B12)
Cust_name (C3:C12)
Appt_date (D3:D12)
Appt_time (E3:E12)
Venue (F3:F12)
Coordinator (G3:G12)
Assistant (H3:H12)
Search_customer (D15)
Search_cust_name (D16)
Search_Appt_date (D17)
Search_Appt_time (D18)
Search_venue (D19)
Search_Assistant (D20)
Search_Coordinator (D21)
What is named ranges?
Download excel example file.
Lookup with multiple criteria and display multiple search results.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
COUNT(value1;[value2])
Counts the number of cells in a range that contain numbers
SMALL(array,k) returns the k-th smallest row number in this data set.
ISNUMBER(value)
Checks whether a value is a number and returns TRUE or FALSE
SUM(number1,[number2],)
Adds all the numbers in a range of cells
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)
This blog article is one out of five articles on the same subject.
- Search for a cell value in an excel table
- Search for a text string in an excel table
- Lookup with multiple criteria and display multiple search results using excel formula
- Lookup with multiple criteria and display multiple search results using excel formula, part 2
- Lookup with multiple criteria and display multiple search results using excel formula, part 3
- Lookup with multiple criteria and display multiple search results using excel formula, part 4
Read more related articles in the archive.
Related blog posts
- Lookup with multiple criteria and display multiple unique search results (array formula)
- Lookup with multiple criteria and display multiple search results using excel formula
- Lookup with multiple criteria and display multiple search results using excel formula, part 3
- Lookup with multiple criteria and display multiple search results using excel formula, part 2
- Search and display all cells that contain all search strings in excel








October 4th, 2009 at 6:05 am
Hi Oscar, love your blogs! great tutorials. Keep them coming!
October 4th, 2009 at 8:32 am
Chrisham,thanks!
February 11th, 2010 at 11:56 am
Thank you for the example. However I stillhave a problem that do not fit on your examples.
I have a table of 3 coloms (Security name, date, price) and I have to find the price a a security at a certain date in a table that contain many securities and prices for this securities for different dates. If I work with vlookup or Index-match I got only the first price for a certain securities. So I am not able to find the price of a securities that match both the name of the securities and the date. Could you advice if there is any way to overcome?
February 11th, 2010 at 11:22 pm
Paolo,
See this blog post: http://www.get-digital-help.com/2010/02/11/match-two-criteria-and-return-multiple-rows-in-excel/
February 17th, 2010 at 12:17 pm
Hi Oscar,
I've got a problem using your suggested approach. I have a list which I need to search from. I have three search criteria, and wish to output a fourth item. For each combination of the search criteria, there will only be one matching result.
I'm trying to use a series of search criteria (arranged in a table - with one row for each search instance, one column for each criterion) which is located on a different worksheet within the same workbook to the data table from which I need to extract the values.
The first search returns the desired result, however the next row returns #NUM error. In order to replicate the formula on the second and subsequent rows I've used a straight forward copy/past - the formula appears to be an Array one still (preceded and suceeded by {} as appropriate).
Do you have any suggestions which might help?
Do you have any suggestions on what might be causing this?
March 15th, 2010 at 2:30 am
Oscar,
You are doing exacting what I have been trying to do for my Excel file but I cannot seem to get mine to work for some reason. Do you think you could take a look at my file if you have a chance. I would greatly appreciate it.
March 15th, 2010 at 10:34 pm
Bryant,
http://www.get-digital-help.com/contact/
December 29th, 2010 at 6:04 pm
Hi, Can you do this with a greater than date?
December 30th, 2010 at 9:53 am
Arielle,
Array formula in cell B25:
=SMALL(IF((COUNTIF(Search_customer, Customer)+COUNTIF(Search_cust_name, Cust_name)+COUNTIF(Search_Appt_time, Appt_time)+COUNTIF(Search_venue, Venue)+COUNTIF(Search_Coordinator, Coordinator)+COUNTIF(Search_Assistant, Assistant))*COUNTIF(Search_Appt_date, "<"&Appt_date), ROW(Customer)-MIN(ROW(Customer))+1), ROWS(B24:$B$24)) + CTRL + SHIFT + ENTER.
Copy cell b25 and paste it to the cells below, as far as needed.
March 16th, 2011 at 9:39 pm
Hi,
Can you search within the whole excel workbook instead of just the sheet?
thanks
March 16th, 2011 at 9:49 pm
Also, what if I want to search 2 or more words within a column but they are not together (ex. 1 of the cell stated "hamburger, hotdog, soda", can i search for both hamburger and hotdog if are not side by side?)
thanks for your help