When data in cells from two different columns match, take sum of corresponding data from third column

Python49

New Member
Joined
Aug 18, 2018
Messages
32
Hello,

I have been having some trouble figuring out a SUMSIF or SUMPRODUCT formula to accomplish this, as well as searching on google and the forums for some time. Can someone please help me with the formula to accomplish the following:

Three columns of data, A, B, C:


ChrisChris100
Dan150
Doug200
JimJim250
Mary300

<tbody>
</tbody>


I'd like the values from the third column to be sum'd when cells from A and B match please. In the above example it would be 100 for Chris and 250 for Jim, totaling to 350.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to the MrExcel board!

Try this

Excel Workbook
ABCDE
1
2ChrisChris100350
3Dan150
4Doug200
5JimJim250
6Mary300
Sum
 
Upvote 0
Welcome to the MrExcel board!

Try this

Sum

ABCDE
1
2ChrisChris100 350
3Dan 150
4Doug 200
5JimJim250
6Mary 300

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:49px;"><col style="width:49px;"><col style="width:40px;"><col style="width:56px;"><col style="width:40px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E2=SUMPRODUCT(--(A2:A6=B2:B6),C2:C6)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
Hi Peter, thanks for the speedy reply! Upon doing this I have now found why I wasn't able to get it to work before. I didn't explain I think what I was hoping to do correctly. In the above example, what I actually need, but not sure if excel can do it (although I'm hopeful since I haven't seen much that excel can't do!!) is for the following:

Chris$50Mary
Dan $25n/a
Doug$50n/a
Jim $35Chris
Mary$40n/a

<tbody>
</tbody>


Example above, column A has the names of people, column B has how much they get paid if they attend a meeting/job/event/etc. If their name shows up on column C then they get paid the amount next to their name, but their name might not be in order for column C. Is there a way to get the total? For example, in the above example, because Mary and Chris are both on the list, the total amount to be paid is $50+$40 = $90 total for Mary and Chris.
 
Upvote 0
I didn't explain I think what I was hoping to do correctly.
That does make a difference - it is all we have to go on. :)

Try this version.

Excel Workbook
ABCDE
1
2Chris$50Mary90
3Dan$25n/a
4Doug$50n/a
5Jim$35Chris
6Mary$40n/a
Sum
 
Upvote 0
That does make a difference - it is all we have to go on. :)

Try this version.

Sum

ABCDE
1
2Chris$50 Mary 90
3Dan$25 n/a
4Doug$50 n/a
5Jim$35 Chris
6Mary$40 n/a

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:56px;"><col style="width:56px;"><col style="width:56px;"><col style="width:24px;"><col style="width:37px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E2=SUMPRODUCT(--ISNUMBER(MATCH(A2:A6,C2:C6,0)),B2:B6)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
Marvelous! Great thanks :)
 
Upvote 0
I had one more question which I'd LOVE if you can help me with! Google sheets is great but one of the WORST features that's extremely aggravating is the tool that automatically turns the mouse cursor into a hand when it hovers between cells and then can drag a cell anywhere you want it. This causes lots of mistakes for me if I misclick and then it now drags a cell that I was simply trying to select and now it's moved formulas and deleted stuff. Even worse is that sometimes I don't notice it until later when a formula has stopped working. Please tell me there's a way to disable this function?
 
Upvote 0

Forum statistics

Threads
1,214,393
Messages
6,119,261
Members
448,880
Latest member
aveternik

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