compare 2 colums of data and sum value on 3rd

jbrown

New Member
Joined
May 11, 2002
Messages
7
I need a formula to compare names in column a with letters in column b and if a match to sum the value in c.

a b c

bill x 22
fred c 11
greg x 10
bill x 11

I need to sum column c when a=bill,b=x
I should have a result of 33 with this example.
I have tried several formulas but cannot get this result. I would appreciate any help! Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
On 2002-05-12 16:44, jbrown wrote:
I need a formula to compare names in column a with letters in column b and if a match to sum the value in c.

a b c

bill x 22
fred c 11
greg x 10
bill x 11

I need to sum column c when a=bill,b=x
I should have a result of 33 with this example.
I have tried several formulas but cannot get this result. I would appreciate any help! Thanks!

=SUMPRODUCT(($A$2:$A$5=E1)*($B$2:$B$5=E2),($C$2:$C$5))

where E1 houses a value like bill and E2 a value like x.
 
Upvote 0
{=SUM((A1:A4="bill")*(B1:B4="x")*C1:C4)}

Note: This is an array formula which must be entered using the Control+Shift+Enter key combination.
 
Upvote 0
EITHER PUT ON THE SAME SHEET OR ADD "SHEET1! TO THE FRONT OF YOUR RANGES
IE SHEET1!$A:$B

Suggestion:
To see the syntax go to another sheet , select cell , click = button then select another sheet... you will see the syntax auto built for you
 
Upvote 0

Forum statistics

Threads
1,213,507
Messages
6,114,029
Members
448,543
Latest member
MartinLarkin

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