Sum where value is x

IMB picture IMB · Dec 14, 2011 · Viewed 30.3k times · Source

How do you get the sum of all values of A if it has "foo" in column B? In the example below the sum should be 8.

enter image description here

Answer

brettdj picture brettdj · Dec 14, 2011

try this

=SUMIF(B:B,"foo",A:A)