How to list out the location of duplicated maximum value in Excel?

alantse2010

New Member
Joined
Jun 9, 2018
Messages
31
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
I have the table to show the NC quantity and C quantity of item 1.1a - 1.4e in excel file.

Capture.jpg
I want to find out the maximum value of C, that i use below formula in H4:

=MAX(C4:C22)

that show the maximum value of C is 8, then i want to find the maximum value corresponding to which item, so i use below formula in H5:

=(INDEX($A$4:$A$22,MATCH(H4,$C$4:$C$22,0)))

It shows only one result which is 1.1a, how can i list out all the item which has the maximum value which i use for vlookup the information?

Please find the Capture.jpg for your reference. Thank you very much for your help.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Are you okay with a VBA solution?
If yes, how do you want to display them? down column H? or across row 5?
Since you're looking up the description, maybe show how the output should look like with more than 1 match/result.
 
Upvote 0
Are you okay with a VBA solution?
If yes, how do you want to display them? down column H? or across row 5?
Since you're looking up the description, maybe show how the output should look like with more than 1 match/result.
Both of formula and VBA are OK. i want to display the all the corresponding item on next column I, J, K...etc

Could i use the FILTER formula to list out?

Thank you.
 
Upvote 0
Hi try This!

TempO.xlsx
ABCDEFGH
1
2Overal Data
3ITEMNC quantityC Quantity
41.1a08Maixum Calue of C8
51.1b53Maixum Value of C corresponded item Count6
61.1c08Maixum Value of C corresponded item1.1a
71.1d081.1c
81.1e081.1d
91.1f081.1e
101.2a001.1f
111.2b701.4a
121.2c80 
131.2d05 
141.2e00 
151.2f04
161.3a00
171.3b80
181.3c80
191.3d02
201.3e00
211.3f00
221.4a08
231.4b00
241.4c01
251.4d02
261.4e03
271.4f04
Sheet4
Cell Formulas
RangeFormula
H4H4=MAX($C$4:$C$27)
H5H5=COUNTIF($C$4:$C$27,H4)
H6:H14H6=IF(ROWS($H$6:H6)>$H$5,"",INDEX($A$4:$A$27,AGGREGATE(15,6,IF($C$4:$C$27=$H$4,ROW($A$4:$A$27)-ROW($A$4)+1),ROWS($H$6:H6))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Or try this:

=TEXTJOIN(" -",TRUE,IF($C$4:$C$22=MAX($C$4:$C$22),$A$4:$A$22,""))

Enter with Ctrl+Shift+Enter.
 
Upvote 0
Could i use the FILTER formula to list out?
That sounds like you have Excel 365 & if so the answer is 'yes'
I suggest that you update your Account details (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’)

i want to display the all the corresponding item on next column I, J, K...etc
21 01 26.xlsm
ABCDEFGHIJKLM
1
2
3ITEMNC quantityC quantity
41.1a08Maixum Calue of C8
51.1b53Maixum Value of C correspond item1.1a1.1c1.1d1.1e1.1f
61.1c08
71.1d08
81.1e08
91.1f08
101.2a00
111.2b70
121.2c80
131.2d05
141.2e00
151.3a04
161.3b80
171.3c80
181.4a00
191.4b02
201.4c00
211.4d00
221.4e00
Max Values
Cell Formulas
RangeFormula
H4H4=MAX($C$4:$C$22)
H5:L5H5=TRANSPOSE(FILTER(A4:A22,C4:C22=H4,""))
Dynamic array formulas.
 
Upvote 0
Solution
Book1
ABCDEFGHI
1
2
3ITEMNCC
41.1a0881.1a
51.1b531.1c
61.1c081.1d
71.1d081.1e
81.1e081.1f
91.1f08 
101.2a00 
111.2b70 
121.2c80 
131.2d05 
141.2e00 
151.3a04 
161.3b80 
171.3c80 
181.4a00 
191.4b02 
201.4c00 
211.4d00 
221.4e00 
Sheet1
Cell Formulas
RangeFormula
H4H4=MAX(C:C)
I4:I22I4=IFERROR(INDEX($A$4:$A$22,AGGREGATE(15,6,(ROW($A$4:$A$22)-ROW($A$4)+1)/($C$4:$C$22=$H$4),ROWS($G$4:G4))),"")
 
Upvote 0
Thank you all very much for your help. Everyone answer is work.

It is sorry that it cannot choose more than one reply as best post.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,038
Members
448,940
Latest member
mdusw

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