Can I get a Sum From All Values in a column that have a specific value in the column next to them?

Gryrok

New Member
Joined
Feb 16, 2016
Messages
6
So, I'd like to have a list of transactions, and have each transaction be labeled something. Next to this list I'd like to have a total value of each transaction with a specific label. Like, if we were totally an amount spend on an event, we could say "$5" "Promotions" and "$10" "Services" etc. etc., and in the table next to that, it would, in a single cell, add the total value assigned each label, like it shows below.

What would I put in the cell shown below to get the total value of everything labeled A?


Thanks in advance for your help, and I apologize if this has been asked/answered, I tried searching for it, but I just don't know how to look or what to call it.



dateitemvalueTotal Values Based on Item
1-SepA1AHOW DO I GET THIS CELL?
2-SepC2B
3-SepD1C
4-SepA2D
1-SepB3E
2-SepE4
3-SepC3
4-SepD1
1-SepC2
2-SepA2
3-SepC1
4-SepA2

<tbody>
</tbody>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
something like...

F2=SUMIF($B$2:$B$13,E2,$C$2)

Row\Col
A​
B​
C​
D​
E​
F​
1​
dateitemvalueItemsTotal
2​
1-Sep​
A
1​
A
7​
3​
2-Sep​
C
2​
B
3​
4​
3-Sep​
D
1​
C
8​
5​
4-Sep​
A
2​
D
2​
6​
1-Sep​
B
3​
E
4​
7​
2-Sep​
E
4​
8​
3-Sep​
C
3​
9​
4-Sep​
D
1​
10​
1-Sep​
C
2​
11​
2-Sep​
A
2​
12​
3-Sep​
C
1​
13​
4-Sep​
A
2​

<tbody>
</tbody>
 
Upvote 0
dateitemvalueTotal Values Based on Item
01-SepA1A7
02-SepC2B3
03-SepD1C8
04-SepA2D2
01-SepB3E4
02-SepE4
03-SepC3
04-SepD1
01-SepC2
02-SepA2the 7 next to a comes from
03-SepC1
04-SepA2=SUMPRODUCT(($B$2:$B$13=E2)*($C$2:$C$13))

<colgroup><col span="13"></colgroup><tbody>
</tbody>
 
Upvote 0
dateitemvalue01-Sep02-Sep03-Sep04-Sep
01-SepA1A3479
02-SepC2B3005
03-SepD1C8872
04-SepA2D0223
01-SepB3E5400
02-SepE472
03-SepC3
04-SepD1
01-SepC2
02-SepA2the 7 next to a comes from
03-SepC1
04-SepA2=SUMPRODUCT(($B$2:$B$13=E2)*($C$2:$C$13))
01-SepC2
02-SepD1
03-SepA2then I added an extra term to allow you to analyse by date
04-SepB3
01-SepE4
02-SepC3so the 3 under 01-Sep comes from
03-SepD1
04-SepC2
01-SepA2=SUMPRODUCT(($B$2:$B$37=$E2)*($C$2:$C$37)*($A$2:$A$37=F$1))
02-SepC1
03-SepA1
04-SepD2
01-SepC1
02-SepA2
03-SepC3
04-SepA4
01-SepC3
02-SepD1
03-SepA2
04-SepB2
01-SepE1
02-SepC2
03-SepA2
04-SepA1
72

<colgroup><col width="64" span="14" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Gryrok,

How about something like this?


Excel 2007
ABCDE
1dateitemvalueItemTotal Values Based on Item
21-SepA1A7
32-SepC2B3
43-SepD1C8
54-SepA2D2
61-SepB3E4
72-SepE4
83-SepC3
94-SepD1
101-SepC2
112-SepA2
123-SepC1
134-SepA2
14
Sheet1
Cell Formulas
RangeFormula
E2=SUMIF($B$2:$B$13,D2,$C$2:$C$13)



The formula in cell E2, copied down:

=SUMIF($B$2:$B$13,D2,$C$2:$C$13)
 
Upvote 0
if we were totally an amount spend on an event, we could say "$5" "Promotions" and "$10" "Services" etc. etc., and in the table next to that, it would, in a single cell, add the total value assigned each label, like it shows below.

It looks like we all have missed the above.

Gryrok,

Can we see what other $ values, and, text, that go with the other etc.'s?
 
Last edited:
Upvote 0
Oh my goodness! Thank you all so very much for a nice simple clean solution. I figured there had to be a function somewhere, and I just didn't know which it was, and this was IT EXACTLY! Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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