#1   Report Post  
wz
 
Posts: n/a
Default Aggregated charts

Hi friends,
I'm trying to draw a chart which looks like an enhanced histogram chart:
1. I have 3 columns, A, B and C
2. I'll use C as bin to categorize A into different buckets. But I'm not
counting A, instead I'll sum B according to the bucket

for example:
input:
A B C
0.5 3.5 1
0.7 3 2
1.2 2.2 3
2.3 1.5
2.5 3

expected output:
C SumOfB
1 6.5
2 2.2
3 4.5
M 0

Is there a way to create the chart with existing capability in excel 2003?
If not, is there an add-in for download?
If I have to write VBA, what would it looks like?

Any sugesstion is appreciated,

Wei



  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

I used an array formula for this. Here is A1:D5 in my worksheet:

0.5 3.5 1 6.5
0.7 3 2 2.2
1.2 2.2 3 4.5
2.3 1.5
2.5 3

The formula in D1 is:

=SUM(($A$1:$A$5<=C1)*($A$1:$A$5C1-1)*$B$1:$B$5)

This is an array formula, which means type it in the cell, then hold
Ctrl-Shift while pressing Enter. If you do it right, Excel encloses it
in {curly braces}.

Fill the formula down to D3 to get the other two sums.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


wz wrote:

Hi friends,
I'm trying to draw a chart which looks like an enhanced histogram chart:
1. I have 3 columns, A, B and C
2. I'll use C as bin to categorize A into different buckets. But I'm not
counting A, instead I'll sum B according to the bucket

for example:
input:
A B C
0.5 3.5 1
0.7 3 2
1.2 2.2 3
2.3 1.5
2.5 3

expected output:
C SumOfB
1 6.5
2 2.2
3 4.5
M 0

Is there a way to create the chart with existing capability in excel 2003?
If not, is there an add-in for download?
If I have to write VBA, what would it looks like?

Any sugesstion is appreciated,

Wei



  #3   Report Post  
wz
 
Posts: n/a
Default

It works! Thanks a lot!

Wei

"Jon Peltier" wrote:

I used an array formula for this. Here is A1:D5 in my worksheet:

0.5 3.5 1 6.5
0.7 3 2 2.2
1.2 2.2 3 4.5
2.3 1.5
2.5 3

The formula in D1 is:

=SUM(($A$1:$A$5<=C1)*($A$1:$A$5C1-1)*$B$1:$B$5)

This is an array formula, which means type it in the cell, then hold
Ctrl-Shift while pressing Enter. If you do it right, Excel encloses it
in {curly braces}.

Fill the formula down to D3 to get the other two sums.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


wz wrote:

Hi friends,
I'm trying to draw a chart which looks like an enhanced histogram chart:
1. I have 3 columns, A, B and C
2. I'll use C as bin to categorize A into different buckets. But I'm not
counting A, instead I'll sum B according to the bucket

for example:
input:
A B C
0.5 3.5 1
0.7 3 2
1.2 2.2 3
2.3 1.5
2.5 3

expected output:
C SumOfB
1 6.5
2 2.2
3 4.5
M 0

Is there a way to create the chart with existing capability in excel 2003?
If not, is there an add-in for download?
If I have to write VBA, what would it looks like?

Any sugesstion is appreciated,

Wei




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stacked Charts w/ Vertical Separation Stacey Charts and Charting in Excel 1 June 10th 05 07:35 PM
linkingof charts in worksheets to cells steve Excel Discussion (Misc queries) 0 May 6th 05 01:44 AM
Can't create dynamic charts Brian Sells Charts and Charting in Excel 7 March 22nd 05 04:23 AM
i need help automating, or at least simplifying, my charts JZip Charts and Charting in Excel 1 February 9th 05 12:46 AM
initial size of new charts bob m Charts and Charting in Excel 1 January 22nd 05 02:19 AM


All times are GMT +1. The time now is 04:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"