» Retrieving an Item from a List that Meets Multiple Criteria
CATEGORY - Excel Formula and Function
VERSION - All Microsoft Excel Versions
Range A2:C7 contains a list of items and their corresponding colors and prices.
We want to find the name of the first Blue item that costs less than $200.
Solution:
Use the INDEX and MATCH functions as shown in the following Array formula:
{=INDEX(A2:A7,MATCH(1,(B2:B7=D2)*(C2:C7
Example:
Item______Color____Price___Criteria
Shoes_____Red______$140____Blue
Jacket____Brown____$300____$200
Shoes_____Blue_____$199
T-Shirt___Green____$10
Jeans_____Blue_____$150
Shoes_____Black____$99
Result_____Shoes

Book Store:
Recommended Books:
- The McGraw-Hill Guide to Writing a High-Impact Business Plan: A Proven Blueprint for First-Time Entrepreneurs
- Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!
- Business Plans For Dummies®
- Essentials of Accounting and Post Test Booklet 8, Eighth Edition
- 422 Tax Deductions for Businesses and Self-Employed Individuals : You Get a Raise Every Time You Find a Legitimate Tax Deduction
- Wall Street Journal Guide to Understanding Money and Investing
Issues with example
The Bobka
I tried setting up the example in a blank worksheet and it was not able to come back with "Shoes". Is there some formatting issues here, or is there a version problem, something missing from the formula?
tmarsh
it worked for me!
i copied the table from the web page table, pasted into A1, converted all "_" to spaces, deleted all excess spaces (using ASAP utilities), then used 'text to columns...' to convert the text to multiple columns (using the space character as the delimiter).
the forumla as shown does not work; you have to remove the curly brackets at either end, then press <CTRL>+<SHIFT>+<ENTER> together (which makes it an array formula and puts the curly brackets back in) ;)
Not me.
DCPHOLD
I followed same method as tmarsh and although it returns shoes, it only ever returns shoes! Even with no criteria the formula results in shoes. What have I missed?
Mistake in formula
Chris Barlow
The last part is missing an = sign because it should be less than or equal to i.e., (C2:C7 <= D3)))}
If you change the criteria it should now work
Retrieving an Item from a List that Meets Multiple Criteria
M.Hussain
I tried this formula {=INDEX(A2:A7,MATCH(1,(B2:B7=D2)*(C2:C7<D3)))}
but its not working may be I am missing some things please reply me regarding this error at my following. Thanks
hussain_detho@yahoo.com
Graham
For this to work properly, the Match_type of the MATCH function must be specified as "0". If omitted, it is assumed as "1" - finds the largest value less than or equal to the lookup value, and requires that the array values be in ascending order. The formula should be:
{=INDEX(A2:A7,MATCH(1,(B2:B7=D2)*(C2:C7<D3),0))}
Doubt
Kannan
{=INDEX(A2:A7,MATCH(1,(B2:B7=D2)*(C2:C7<D3),0))}
In the above formula u r using multiplication (*) symbol. When u use division (/) symbol also it returns u the same value. What is the difference?

