Index/Match with mutiple criteria and match type 1

raven_squire

Board Regular
Joined
Jan 13, 2013
Messages
99
Hello,

I am trying to index/match multiple criteria. The formula below meets most of my needs but I need the match type to be 1 not zero.
=INDEX(E23:E5000,MATCH(A3&B3&F3&C3,A23:A5000&B23:B5000&F23:F5000&C23:C5000,0))

All the criteria will match in their respective columns exactly, except for C3 witch is => column c and =< column d. So I can get away with a match type of 1 and just compare to column C. However when I change the match type to 1 with this formula it returns "0" and -1 returns "#N/A". Zero is not contained within the data so I am not sure what is happening.

Interestingly this formula works identically and has the same errors

=INDEX(E23:E5000,MATCH(A3&B3&F3&C3,A23:A5000&B23:B5000&F23:F5000&C23:C5000,0&0&0&0))

There appears to be little information available on the net about Index/Match with multiple criteria so you help will be greatly appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How about:
=LOOKUP(2,1/((A23:A5000=A3)*(B23:B5000=B3)*(F23:F5000=F3)*(C23:C5000<=C3)*(D23:D5000>=C3)),E23:E5000)
 
Upvote 0
I just read up about lookup and looks like you have some white magic happening there.
The syntax for lookup as far as I can see is LOOKUP(lookup_value, lookup_vector, [result_vector])

Why does the formula look up "2"?
How does 1/1/((A23:A5000=A3)*(B23:B5000=B3)*(F23:F5000=F3)*(C23:C5000<=C3)*(D23:D5000>=C3)) refer to a vector?

I am happy to have the problem solved but it appears that there is a lot to learn about the answer. :-)
 
Upvote 0
For example, criteria statement, A23:A5000=A3 establish range of TRUE/FALSE.
But this lookup vector ,{FALSE,TRUE,FALSE,...}, may be not in increasing order as being required from lookup function.
So try to convert it to: 1/(A23:A5000) = {#DIV/0,1,#DIV/0,...}
Then LOOKUP value 2 (or any value that greater than 1) to value 1 in lookup vector.

Hope this helps.
 
Upvote 0
I just read up about lookup and looks like you have some white magic happening there.
The syntax for lookup as far as I can see is LOOKUP(lookup_value, lookup_vector, [result_vector])

Why does the formula look up "2"?
How does 1/1/((A23:A5000=A3)*(B23:B5000=B3)*(F23:F5000=F3)*(C23:C5000<=C3)*(D23:D5000>=C3)) refer to a vector?

I am happy to have the problem solved but it appears that there is a lot to learn about the answer. :-)

That helps a lot, I also found this article that explains it (it is towards the bottom of the article). Thanks
https://blogs.office.com/2012/04/26/using-multiple-criteria-in-excel-lookup-formulas/

See:
http://www.mrexcel.com/forum/excel-questions/99621-lookup-value-unsorted-data.html
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top