# Sum cells where another cell in the same row has a certain value

1. ## Sum cells where another cell in the same row has a certain value

Hi!

I want to be able to total up the values in column A but only including the cells in that column which have a certain value in the adjacent cell (in column B).

i.e. something like
=SUM(A1:A100) WHERE B1:B100="SomeValue"

ANy ideas?  Register To Reply

2. ## Re: Sum cells where another cell in the same row has a certain value

=SUMIF(B1:B100,"SomeValue",A1:A100)  Register To Reply

3. ## Re: Sum cells where another cell in the same row has a certain value

I think you are looking for the sumif formula ?
In your example the formula looks like this:

=sum.if(B1:B100;"some value";A1:A100)

Note: since I am using a non english version I had to guess for the formula name sum.if and the "some value" can be a reference to a cell offcourse...

Hope this helps !  Register To Reply

4. ## Re: Sum cells where another cell in the same row has a certain value

Great! Now one other thing... can I add another criteria to that?

i.e.
=SUM(A1:A100) WHERE B1:B100="SomeValue" AND C1:C100=DateBetween(1/1/08 and 31/1/08)

Thank again!  Register To Reply