Get MAX value and Other Value based on Criteria

aetedford

New Member
Joined
Mar 26, 2018
Messages
9
Office Version
  1. 365
I have a table (pasted below) showing COMPANY, BRAND, VALUE.

I am trying to put a fomula in E2 that looks at the company name in E1, then looks in the table and picks the brand AND the value for ONLY the MAX for the company in E2.
So, E2 should come up with BRAND3: 30
F2 should come up with BRAND8: 25


Book1
ABCDEFGHI
1COMPANYBRANDVALUECOMPANY1COMPANY2COMPANY3COMPANY4COMPANY5
2Company1Brand115Brand name: valueBrand name: valueBrand name: valueBrand name: valueBrand name: value
3Company1Brand212
4Company1Brand330
5Company1Brand426
6Company2Brand55
7Company2Brand621
8Company2Brand719
9Company2Brand825
10Company3Brand1022
11Company3Brand1124
12Company3Brand1229
13Company3Brand1327
14Company4Brand1416
15Company4Brand153
16Company4Brand1621
17Company4Brand177
18Company5Brand195
19Company5Brand2026
20Company5Brand2128
21Company5Brand2214
Sheet1
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Thank you. Just saw that in another post and have updated.
 
Upvote 0
In E2 =MAXIFS(C1:C20,A2:A21,E1)&":"&INDEX(B2:B21,MATCH(MAXIFS(C2:C21,A2:A21,E1),C2:C21,0))
 
Upvote 0
Thanks for that, how about
+Fluff 1.xlsm
ABCDEFGHI
1COMPANYBRANDVALUECOMPANY1COMPANY2COMPANY3COMPANY4COMPANY5
2Company1Brand115Brand3Brand8Brand12Brand16Brand21
3Company1Brand2123025292128
4Company1Brand330
5Company1Brand426
6Company2Brand55
7Company2Brand621
8Company2Brand719
9Company2Brand825
10Company3Brand1022
11Company3Brand1124
12Company3Brand1229
13Company3Brand1327
14Company4Brand1416
15Company4Brand153
16Company4Brand1621
17Company4Brand177
18Company5Brand195
19Company5Brand2026
20Company5Brand2128
21Company5Brand2214
22
Data
Cell Formulas
RangeFormula
E2:I3E2=INDEX(SORT(FILTER($B$2:$C$50,$A$2:$A$50=E1),2,-1),,{1;2})
Dynamic array formulas.
 
Upvote 0
Perfect - maybe I'll have to make another thread, but what would happen if there were MAX values for multiple brands? Say, C3 =30, so there are technically 2 results.

If you think I need a new thread, no worries.
 
Upvote 0
I would want to list each on a separate line:

BRAND ONE: VALUE
BRAND TWO: VALUE
...
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEFGHI
1COMPANYBRANDVALUECOMPANY1COMPANY2COMPANY3COMPANY4COMPANY5
2Company1Brand115Brand2 : 30Brand8 : 25Brand12 : 29Brand16 : 21Brand21 : 28
3Company1Brand230Brand3 : 30
4Company1Brand330
5Company1Brand426
6Company2Brand55
7Company2Brand621
8Company2Brand719
9Company2Brand825
10Company3Brand1022
11Company3Brand1124
12Company3Brand1229
13Company3Brand1327
14Company4Brand1416
15Company4Brand153
16Company4Brand1621
17Company4Brand177
18Company5Brand195
19Company5Brand2026
20Company5Brand2128
21Company5Brand2214
Data
Cell Formulas
RangeFormula
E2:E3,F2:I2E2=FILTER($B$2:$B$50&" : "&$C$2:$C$50,($A$2:$A$50=E1)*($C$2:$C$50=MAXIFS($C$2:$C$50,$A$2:$A$50,E1)))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

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