## Saturday, August 3, 2013

### Google Group By Query for Two Columns

Question:

( by
Nancy Fletcher )

Sheet 1 is a summary sheet that has
A        B             C
Year   Category  Summary of the Budget
2013   Hardware  "X"

Sheet 2 is a data entry sheet that has
A        B             C
Year   Category   Amount
2013   Hardware   \$50000
2013   Hardware   \$10000
2013   Prof Sec    \$15000

Solution:

Have a look at the following screenshot of 'Sheet2' of my Spreadsheet, that is data sheet:

Have a look at the following screenshot of 'Sheet1' of my Spreadsheet, that is summary sheet:

I have the following formula in Cell A1:
=query('Sheet2'!A:C;"select A,B,sum(C) where B<>'' and A=2013 group by A,B label sum(C) 'Summary of the Budget' ")

And I have the following formula in Cell A12:
=query('Sheet2'!A:C;"select A,B,sum(C) where B<>'' group by A,B label sum(C) 'Summary of the Budget' ")

You can use any of the formula as per your requirement.

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,