ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   chart - in order of high to low (https://www.excelbanter.com/excel-programming/425017-chart-order-high-low.html)

tracktraining

chart - in order of high to low
 
Hi All,

I would like to create bar graph using vba. I know how to do a simple bar
graph, but need help with a bit more complex one (well complex for me).

I have the following data in my excel sheet:

A B
1 Fish 0
2 Dog 2
3 Cat 4
4 Rat 0
5 Bat 5


I would like to have a bar graph with the first bar to be Bat (5), Cat(4),
Dog (2), Fish(0), and Rat (0)............ But the bar graph will change if
the value of B changes. So the bar graph should look for the largest value
and have that to be the first bar and then the second largest value to be the
second bar and so on.

Please help. Thanks

Tracktraining
--
Learning

ryguy7272

chart - in order of high to low
 
Ok, just got to Data Sort, then Sort by the 2nd Column, and then sort by
the 1st Column (to make Fish listed before Rat). Then, just build your
graph.


Regards,
Ryan---
--
RyGuy


"tracktraining" wrote:

Hi All,

I would like to create bar graph using vba. I know how to do a simple bar
graph, but need help with a bit more complex one (well complex for me).

I have the following data in my excel sheet:

A B
1 Fish 0
2 Dog 2
3 Cat 4
4 Rat 0
5 Bat 5


I would like to have a bar graph with the first bar to be Bat (5), Cat(4),
Dog (2), Fish(0), and Rat (0)............ But the bar graph will change if
the value of B changes. So the bar graph should look for the largest value
and have that to be the first bar and then the second largest value to be the
second bar and so on.

Please help. Thanks

Tracktraining
--
Learning


tracktraining

chart - in order of high to low
 
Thanks! that is perfect!
--
Learning


"ryguy7272" wrote:

Ok, just got to Data Sort, then Sort by the 2nd Column, and then sort by
the 1st Column (to make Fish listed before Rat). Then, just build your
graph.


Regards,
Ryan---
--
RyGuy


"tracktraining" wrote:

Hi All,

I would like to create bar graph using vba. I know how to do a simple bar
graph, but need help with a bit more complex one (well complex for me).

I have the following data in my excel sheet:

A B
1 Fish 0
2 Dog 2
3 Cat 4
4 Rat 0
5 Bat 5


I would like to have a bar graph with the first bar to be Bat (5), Cat(4),
Dog (2), Fish(0), and Rat (0)............ But the bar graph will change if
the value of B changes. So the bar graph should look for the largest value
and have that to be the first bar and then the second largest value to be the
second bar and so on.

Please help. Thanks

Tracktraining
--
Learning



All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com