Formula - Find the item with the largest sum

ironbucket1

New Member
Joined
Jan 5, 2022
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hello!

I want a formula that finds the item with the largest sum, for example:

Ball 2
Plate 3
Knife 1
Fork 3
plate 2
knife 2
ball 6

So in this case the formula would show me *Ball* because the sum is 8 and is the highest sum.
I know I can use sumIF, but I wonder if its possible for a formula to just find the item with the highest Sum without having to refer to something other than highest sum.

Right now I'm using *sumif* on each item and then Max/large on those cells, and that works but if a new item comes on the list I have to do another cell with *sumif*.
I prefer to do this without VBA-coding.

Can someone please help me with this?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to the MrExcel forum!

How about:

Book1
ABCDE
1ItemCountMax CountItem
2Ball28Ball
3Plate3
4Knife1
5Fork3
6Plate2
7Knife2
8Ball6
9
10
Sheet42
Cell Formulas
RangeFormula
D2D2=AGGREGATE(14,6,SUMIF(A2:A10,A2:A10,B2:B10)/(A2:A10<>""),1)
E2E2=INDEX(A2:A10,MATCH(D2,SUMIF(A2:A10,A2:A10,B2:B10),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Welcome to the MrExcel forum!

How about:

Book1
ABCDE
1ItemCountMax CountItem
2Ball28Ball
3Plate3
4Knife1
5Fork3
6Plate2
7Knife2
8Ball6
9
10
Sheet42
Cell Formulas
RangeFormula
D2D2=AGGREGATE(14,6,SUMIF(A2:A10,A2:A10,B2:B10)/(A2:A10<>""),1)
E2E2=INDEX(A2:A10,MATCH(D2,SUMIF(A2:A10,A2:A10,B2:B10),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
Sorry for late response! This worked brilliant! Thank you so much :) May I ask one more thing? These formulas really did the job, but if I wanted to have 2 calculations which one summes up and shows the item (Like this formula you showed me) and then a second one that shows the second biggest sum. On the aggregate formula I could change the last digit to 2, but if 2 items have the same sum the Index-formula shows the same item cause it just matches the first item it sees with that number.

I hope this explonation wasnt to confusing..

// A newbie
 
Upvote 0
Try:

Book1 (version 1).xlsb
ABCDE
1ItemCountMax CountItem
2Ball28Ball
3Plate35Plate
4Knife13Knife
5Fork33Fork
6Plate2  
7Knife2  
8Ball6  
9
10
Sheet4
Cell Formulas
RangeFormula
D2:D8D2=IFERROR(AGGREGATE(14,6,SUMIF($A$2:$A$10,$A$2:$A$10,$B$2:$B$10)/(COUNTIF($E$1:$E1,$A$2:$A$10)=0)/($A$2:$A$10<>""),1),"")
E2:E8E2=IF(D2="","",INDEX($A$2:$A$10,MATCH(D2,SUMIF($A$2:$A$10,$A$2:$A$10,$B$2:$B$10)+COUNTIF(E$1:E1,$A$2:$A$10)/PI(),0)))
Press CTRL+SHIFT+ENTER to enter array formulas.


This is not a stand-alone formula, it looks up the values based on excluding the items that are listed above it. But you can drag down the formulas as far as needed.
 
Upvote 0
Try:

Book1 (version 1).xlsb
ABCDE
1ItemCountMax CountItem
2Ball28Ball
3Plate35Plate
4Knife13Knife
5Fork33Fork
6Plate2  
7Knife2  
8Ball6  
9
10
Sheet4
Cell Formulas
RangeFormula
D2:D8D2=IFERROR(AGGREGATE(14,6,SUMIF($A$2:$A$10,$A$2:$A$10,$B$2:$B$10)/(COUNTIF($E$1:$E1,$A$2:$A$10)=0)/($A$2:$A$10<>""),1),"")
E2:E8E2=IF(D2="","",INDEX($A$2:$A$10,MATCH(D2,SUMIF($A$2:$A$10,$A$2:$A$10,$B$2:$B$10)+COUNTIF(E$1:E1,$A$2:$A$10)/PI(),0)))
Press CTRL+SHIFT+ENTER to enter array formulas.


This is not a stand-alone formula, it looks up the values based on excluding the items that are listed above it. But you can drag down the formulas as far as needed.
I dont know how many times i tried to get this to work and you did it in like 5 min, you're a god my man, thank you!
 
Upvote 0
Hi @Eric W wanted to ask if this formula could add another criteria to sum the values considering if another column is empty or full?
 
Upvote 0
Welcome to the MrExcel forum!

Something like this maybe?

Book1
ABCDE
1ItemCountUse?Max CountItem
2Ball2X5Plate
3Plate3X3Fork
4Knife12Ball
5Fork3X
6Plate2X
7Knife2
8Ball6
Sheet6
Cell Formulas
RangeFormula
D2:E4D2=LET(a,UNIQUE(FILTER(A2:A8,C2:C8<>"")),SORT(CHOOSE({1,2},SUMIFS(B2:B8,A2:A8,a,C2:C8,"<>"),a),,-1))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,413
Messages
6,119,372
Members
448,888
Latest member
Arle8907

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