I have three columns. "A", "B", and "C". I want to sum column "C" when "A"
equals a specific value AND "B" equals a specific value.
For example, sum the amuunts in column "C" when "A" equals "ball" AND "B"
equals "bat".
Any ideas?
-Adam
Andrea Jones - 20 Oct 2006 22:16 GMT
You can use an array formula, you need to press CTRL+Shift+Enter after typing
the formula, if you've done this correctly curly brackets {} will appear
around the formula in the formula bar:
Use a formula something like:
=SUM(IF(($A$2:$A$6="ball")*($B$2:$B$6="bat"),$C$2:$C$6))
(it won't work if you don't press CTRL+SHIFT+ENTER to enter the formula)
A Jones
> I have three columns. "A", "B", and "C". I want to sum column "C" when "A"
> equals a specific value AND "B" equals a specific value.
[quoted text clipped - 5 lines]
>
> -Adam
Sandy Mann - 20 Oct 2006 23:00 GMT
You can actually miss out the IF() form your formula and just have:
=SUM(($A$2:$A$6="ball")*($B$2:$B$6="bat")*$C$2:$C$6)
still array entered or make it a SUMPRODUCT() formula:
=SUMPRODUCT(($A$2:$A$6="ball")*($B$2:$B$6="bat")*$C$2:$C$6)

Signature
Regards
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace@mailinator.com with @tiscali.co.uk
> You can use an array formula, you need to press CTRL+Shift+Enter after
> typing
[quoted text clipped - 19 lines]
>>
>> -Adam
Jim - 20 Oct 2006 22:40 GMT
You can put this formula in C.
=SUM(IF(A=1, IF(B=2,A+B,"")))
>I have three columns. "A", "B", and "C". I want to sum column "C" when
>"A"
[quoted text clipped - 6 lines]
>
> -Adam