Thursday, February 16, 2012

yogi_Compute Average Amount For Each Budget Category

Yogi Anand, D.Eng, P.E.                                      Google Spreadsheet                       www.energyefficientbuild.com

user imac13 said:
Average IF
I have a spreadsheet that contains a budget category in column B, and a corresponding dollar value in column C. There are multiple entries for each budget category and I want to create a formula to average the values in column C corresponding to each budget category in column B. I have tried many variations of the formula to no avail. My most recent attempt is as follows.
=AVERAGE( FILTER( C:C ; B:B="Rent" ))
Regards
-----------------------------------------------
since the average is to be computed for each budget category, I suggest using the QUERY finction
following is a solution to the problem