Find index for item with maximum value and multiple criteria

Innoguide

Board Regular
Joined
Sep 13, 2011
Messages
159
I need to find the item in column A with the highest value in column B where the value in column C and column D also match certain criteria

Starting simply without the criteria I would use:

=index(A:A,match(max(B:B),B:B,0)

And to find a match for multiple criteria I would use:

=index(A:A,match(1,Criteria1=C:C)*(Criteria2=D:D),0))

Any suggestions for how I could combine them to find the value in column A that has the maximum result in column B and matches the criteria for the other 2 columns

Thanks in advance!
 
Last edited by a moderator:

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

CA_Punit

Well-known Member
Joined
Nov 18, 2019
Messages
884
Office Version
  1. 365
Platform
  1. Windows
=INDEX(A:A,MATCH(MAX(if(C:C=criteria1,if(D:D=criteria2,B:B)),B:B,0))

Try this with Ctrl+shift+Enter
 

CA_Punit

Well-known Member
Joined
Nov 18, 2019
Messages
884
Office Version
  1. 365
Platform
  1. Windows
I missed out one Bracket

=INDEX(A:A,MATCH(MAX(if(C:C=criteria1,if(D:D=criteria2,B:B))),B:B,0))
 

Innoguide

Board Regular
Joined
Sep 13, 2011
Messages
159

ADVERTISEMENT

What seems to work is
=INDEX(A:A,MATCH(MAX(if(C:C=criteria1,B:B),if(D:D=criteria2,B:B)),B:B,0))
with Ctrl+shift+enter
 

Innoguide

Board Regular
Joined
Sep 13, 2011
Messages
159

ADVERTISEMENT

What seems to work is
=INDEX(A:A,MATCH(MAX(if(C:C=criteria1,B:B),if(D:D=criteria2,B:B)),B:B,0))
with Ctrl+shift+enter
OK - mine isn't working either


and =INDEX(A:A,MATCH(MAX(if(C:C=criteria1,if(D:D=criteria2,B:B))),B:B,0)) comes up an error too
 

CA_Punit

Well-known Member
Joined
Nov 18, 2019
Messages
884
Office Version
  1. 365
Platform
  1. Windows
You have to edit the criteria with your own and after it is done press control shift enter

if not resolved please care to post a sample data using xl2bbb addin
 

Innoguide

Board Regular
Joined
Sep 13, 2011
Messages
159
Yes, I had done both, but here's what I get with formula in cell G4. I'm having problems finding any XL2bbb addin so my apologies but here's a simple screenshot


1594845551407.png
 

Attachments

  • 1594845373508.png
    1594845373508.png
    15.5 KB · Views: 0

CA_Punit

Well-known Member
Joined
Nov 18, 2019
Messages
884
Office Version
  1. 365
Platform
  1. Windows
Book1
ABCDEFGHI
1A93Planned
2B13Planned
3r13Planned
4d143UnplannedA
5
6
7
Sheet3
Cell Formulas
RangeFormula
G4G4=INDEX(A:A,MATCH(MAX(IF(C:C=3,IF(D:D="Planned",B:B))),B:B,0))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,005
Messages
5,599,307
Members
414,303
Latest member
kurama2021

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
Top