Monday, July 29, 2013

Google Spreadsheet Sumif Example

Question:

( by 
hrvooje )

What I'm trying to do is:

   A   B   C
1  X   2   100
2  X   4   200
3  Y   6   300
4  Z   8
5  X   9

If a cell in a column A contains x add 2 to column C. The result should be 102.
If a cell in a column A contains y add 6 to cell C2. The result should be 204.
... and so on
(x, y and z are words)

At the end, the sheet should look like this:

   A   B   C
1  x   2   115 --> ( 100 + B1 + B2 + B5)
2  x   4   206 --> ( 200 + B3)
3  y   6   308 --> ( 300 + B4)
4  z   8
5  x   9

OS: Windows 7
Browser: Chrome

Solution:


Have a look at the following screenshot of my Spreadsheet:




I have the following formula in Cell C1:
=100+sumif(A:A;"X";B:B)

and following formula in Cell C2:
=200+sumif(A:A;"Y";B:B)

and following formula in Cell C3:
=300+sumif(A:A;"Z";B:B)


I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.


I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

No comments:

Post a Comment