Sum values from one column if another column equals x

Solved/Closed
Sarah - 1 Dec 2015 à 15:25
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Moderator Last seen 6 September 2024 - 2 Dec 2015 à 00:20
Hello,
Is there a formula that can calculate the sum of cells from one column if the value in another specific cell equals x (or not blank)? I tried =SUMIF(A:A,"x",B:B) but that didn't do it.

For example:
column A
5
10
5

column B
x
<blank>
x

The sum should be 10.

Thanks!


Related:

1 response

RayH Posts 122 Registration date Tuesday 31 August 2010 Status Contributor Last seen 20 June 2016 26
1 Dec 2015 à 15:45
Put this in a column other than A or B as you will get a circular reference error.
=SUMIF(B:B,"X",A:A)

Hopefully that works. I've not had a lot of lucky with these questions lately.
Thank you! That worked.
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Moderator Last seen 6 September 2024 262 > Sarah
2 Dec 2015 à 00:20
Hi Ray,

Sarah just made your day! ;-)