Friday, May 6, 2011

yogi_Create BarChart That Sums Values In Column With Similar Labels

Yogi Anand, D.Eng, P.E.                                   Google Spreadsheet                      www.energyefficientbuild.com
rcdailey said:
I have two columns: A and B
In column A, there are dates. e.g.:
5/5/2011
5/5/2011
5/6/2011
5/7/2011
In column B, I have integral values:
50
32
109
76
For each value in column B who's corresponding label in column A is identical, generate a sum of those values and represent that sum in the bar graph. So the result (using the data above) for a bar graph would be:
Label: 5/5/2011
Value: 82
Label: 5/6/2011
Value: 109
Label: 5/7/2011
Value 76
This would result in a bar graph with 3 bars (instead of 4 like you normally would see). How can I do this?

---------------------------------------------------------------------------------------
In the proposed solution here, in Sheet1 I added two columns C and D
in column C I extract unique values from column A, and
in column B I sum up the values in column B  for similarly labeled entries in column A
then I create a Bar Chart fro range C:D

-------------------------------------------------------------------------
I added Sheet1a(WithOpenEndedRanges) to generalize the solution so that when more rows are added tn the data range the BarChart automatically updates.