Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
For chart syles, why doesn't color order match series order? | Charts and Charting in Excel | |||
Chart with two series, one high, one low | Excel Worksheet Functions | |||
Stock High-Low-Close Chart | Charts and Charting in Excel | |||
Find all roots of a high-order equation | Excel Discussion (Misc queries) | |||
3/4 High Chart Rule | Charts and Charting in Excel |