Return cell value from table having highest value in corresponding column using multiple conditions ignoring eventual duplicates

Chris78

New Member
Joined
Aug 11, 2017
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Heya ..
I hope someone can take this challenge. I am tryig to return a cell value when having the highest value in a next column using multiple conditions - knowing I can have duplicate values.
I'm looking for a solution without VBA
Let's say I have the table as below.
I want a formula returning the the cell value from column B from the table line having the highest value in column C - but only considering lines where A = GURS and D = 0
1681933096203.png

What I already tried but is unsuccessful:
=INDEX(B:B,MATCH(LARGE(FILTER(C:C,A:A="GURS"),1),C:C*($H$2=A:A),0)) - but that is missing the second condition column D=0
=MAXIFS(C:C,D:D,0,A:A,"GURS") - which returns the expected value but using that in an index - match fails since all of the columns can have duplicates
Note the combination of A & B is unique, meaning there is only one "Genkis" of type (Column A) GURS, but multiple lines can have same C/D values
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi Chris,

First, in future, can you please post any sample data as text or use the add-in xl2BB to post data so that we can easily copy and paste it into Excel in trying to come up with a solution. Thanks!

Now for a possible solution. The following formula returns the individual with the largest value in Column C that meets the criteria. In the event that there are two or more individuals that meet the criteria and have the same largest value in Column C, the formula returns them all.

[Example 1]

chris.xlsm
ABCDEF
1GURSGenkis4415Results
2GURSRohan180Rohan
3GURSVanes4215
4GURSYasin4310
5GURSAaron150
6VERBSFat328
7VERBSEtha70
8VERBSChris4312
9VERBSInes100
10VERBSPatrice438
Sheet1
Cell Formulas
RangeFormula
F2F2=LET(maxValue,MAXIFS(C1:C10,A1:A10,"GURS",D1:D10,0),FILTER(B1:B10,(A1:A10="GURS")*(C1:C10=maxValue)*(D1:D10=0)))


[Example 2]

chris.xlsm
ABCDEF
1GURSGenkis4415Results
2GURSRohan180Rohan
3GURSVanes4215Aaron
4GURSYasin4310
5GURSAaron180
6VERBSFat328
7VERBSEtha70
8VERBSChris4312
9VERBSInes100
10VERBSPatrice438
Sheet1
Cell Formulas
RangeFormula
F2:F3F2=LET(maxValue,MAXIFS(C1:C10,A1:A10,"GURS",D1:D10,0),FILTER(B1:B10,(A1:A10="GURS")*(C1:C10=maxValue)*(D1:D10=0)))
Dynamic array formulas.


Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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