Index Match (find the next highest value) + multiple criteria

camilaarbigaus

New Member
Joined
Apr 17, 2024
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi all, I am trying to do an index match with multiple criteria, but not to return an exact value and I'm having trouble doing it.
Can anybody help?


The idea is the following: I need to find the payment value (column B) for occurence #55 in IL
If there was no "state" column, I would use the formula:

=INDEX(B:B,MATCH(55,C:C)+1)

But if I don't filter by state, it will return the value from FL (200) instead of 400

statepaymentnumber of occurences (cumulative)
IL1001
IL2003
IL30050
IL400140
IL500149
FL1001
FL20056

Any ideas on how to solve this?

Thank you so much!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Maybe this:
MrExcelPlayground22.xlsx
ABCDEF
1statepaymentnumber of occurences (cumulative)
2IL100155IL
3IL2003
4IL30050400
5IL400140
6IL500149
7FL1501
8FL25056
Sheet4
Cell Formulas
RangeFormula
E4E4=INDEX(B2:B8,1+MATCH(E2-0.1,IF(A2:A8=F2,C2:C8,""),1))
 
Upvote 1
Solution
Maybe this:
MrExcelPlayground22.xlsx
ABCDEF
1statepaymentnumber of occurences (cumulative)
2IL100155IL
3IL2003
4IL30050400
5IL400140
6IL500149
7FL1501
8FL25056
Sheet4
Cell Formulas
RangeFormula
E4E4=INDEX(B2:B8,1+MATCH(E2-0.1,IF(A2:A8=F2,C2:C8,""),1))
you are the best!!!! thank you!
 
Upvote 0
Maybe this:
MrExcelPlayground22.xlsx
ABCDEF
1statepaymentnumber of occurences (cumulative)
2IL100155IL
3IL2003
4IL30050400
5IL400140
6IL500149
7FL1501
8FL25056
Sheet4
Cell Formulas
RangeFormula
E4E4=INDEX(B2:B8,1+MATCH(E2-0.1,IF(A2:A8=F2,C2:C8,""),1))
Any idea how I could add a second criteria? (like color?)
 
Upvote 0
Adding a second criteria would work like this:
Add a column B with a color and
=INDEX(C2:C8,1+MATCH(F2-0.1,IF((A2:A8=G2)*(B2:B8=G1),D2:D8,""),1))

But the cumulative nature of the lookup is going to be buggy with the match. It doesn't really work anymore. But this is how to have multiple criteria. Excel 365 would make this easy.
 
Upvote 0

Forum statistics

Threads
1,215,237
Messages
6,123,800
Members
449,127
Latest member
Cyko

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