Excel Sumif ??

Javi

Active Member
Joined
May 26, 2011
Messages
440
Hi All,

Can someone please help me change the below formula so that any matches in column $A$1:$A$1000 sums the matches in Column $D$1:$D$1000.

=SUMIF($A$1:$A$1000,"CL2579",$D$1:$D$1000)
 
You need to create a unique list of each item.
See example below.

Unique list in D2:D6
Formulas in E2:E6 indivually sumif each unique item.
Then E8 is a Sum of those individual sumifs
Then E10 is a formula that will sum all of them in one formula (skipping the individual formulas)

Hope this helps.

Excel Workbook
ABCDE
1ABUnique List
2123$2.001235.5
3222$3.502223.5
4321$1.503216.5
5421$2.254212.25
6123$1.005555
7123$2.50
8555$5.00Total22.75
9321$2.00
10321$3.00All in One22.75
Sheet1
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If I wanted the average of the matching sum and not the sum how would I approach this? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
This formula gives me the total in column C would like the Avg of the total. <o:p></o:p>
=SUMIF(A$1:A$9,A1,B$1:B$9)<o:p></o:p>
<o:p></o:p>
<o:p> </o:p>
-----A---------B-----------C
1--123-----$ 2.00------$ 1.83
2--222-----$ 3.50------$ 3.50
3--321-----$ 1.50------$ 2.16
4--421-----$ 2.25------$ 2.25
5--123-----$ 1.00------$ 1.83
6--123-----$ 2.50------$ 1.83
7--555-----$ 5.00------$ 5.00
8--321-----$ 2.00------$ 2.16
9--321-----$ 3.00------$ 2.16<o:p></o:p>
<o:p> </o:p>
Thanks for all the help!!!<o:p></o:p>
 
Upvote 0
If I wanted the average of the matching sum and not the sum how would I approach this? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
This formula gives me the total in column C would like the Avg of the total. <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
-----A---------B-----------C
1--123-----$ 2.00------$ 1.83
2--222-----$ 3.50------$ 3.50
3--321-----$ 1.50------$ 2.16
4--421-----$ 2.25------$ 2.25
5--123-----$ 1.00------$ 1.83
6--123-----$ 2.50------$ 1.83
7--555-----$ 5.00------$ 5.00
8--321-----$ 2.00------$ 2.16
9--321-----$ 3.00------$ 2.16<o:p></o:p>
<o:p></o:p>
Thanks for all the help!!!<o:p></o:p>
Try one of these...

If you're using Excel 2007 or later...

=AVERAGEIF(A$1:A$9,A1,B$1:B$9)

Copy down as needed.

This array formula** will work in ALL versions of Excel:

=AVERAGE(IF(A$1:A$9=A1,B$1:B$9))

Copy down as needed.

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Last edited:
Upvote 0
Thanks! Works well.

HTML:
[RANGE=cls:xl2bb-100][XR][XH=cs:5]Excel Workbook[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][XH]D[/XH][/XR][XR][XH]1[/XH][XD][/XD][XD=h:c]Test[/XD][XD=h:c]Test[/XD][XD=h:c|c:ff0000]Test[/XD][/XR][XR][XH]2[/XH][XD][/XD][XD=h:c|bc:c0c0c0]2[/XD][XD=h:c|bc:ffff00]3[/XD][XD=h:c]4[/XD][/XR][XR][XH]3[/XH][XD][/XD][XD=h:c]5[/XD][XD=h:c]3[/XD][XD=h:c|bc:ccccff]5[/XD][/XR][XR][XH]4[/XH][XD=h:r]Total[/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(B2:B3)]7[/FORMULA][/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(C2:C3)]6[/FORMULA][/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(D2:D3)]9[/FORMULA][/XD][/XR][XR][XH=cs:5][RANGE][XR][XD]Sheet1[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE]
 
Upvote 0
HTML:
[RANGE=cls:xl2bb-100][XR][XH=cs:5]Excel Workbook[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][XH]D[/XH][/XR][XR][XH]1[/XH][XD][/XD][XD=h:c]Test[/XD][XD=h:c]Test[/XD][XD=h:c|c:ff0000]Test[/XD][/XR][XR][XH]2[/XH][XD][/XD][XD=h:c|bc:c0c0c0]2[/XD][XD=h:c|bc:ffff00]3[/XD][XD=h:c]4[/XD][/XR][XR][XH]3[/XH][XD][/XD][XD=h:c]5[/XD][XD=h:c]3[/XD][XD=h:c|bc:ccccff]5[/XD][/XR][XR][XH]4[/XH][XD=h:r]Total[/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(B2:B3)]7[/FORMULA][/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(C2:C3)]6[/FORMULA][/XD][XD=h:c|fw:b|cls:fx][FORMULA==SUM(D2:D3)]9[/FORMULA][/XD][/XR][XR][XH=cs:5][RANGE][XR][XD]Sheet1[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE]
 
Upvote 0

Forum statistics

Threads
1,225,071
Messages
6,182,685
Members
453,132
Latest member
nsnodgrass73

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