LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creating Graphs + VBA

Hi All

I have a bunch of data that I need to graph. The data basically contains
statistics per person (Min,Max and AVG). I have this in 100 rows.

I need to create a bar chart per person with their stats in graph.

I found the code below to create the grpahs, but I cannot get it to show my
series labels correctly, they just show up as Series1, Series2, Series3,
where as I need it to show Min, Max, Avg :

Sub CreateBarCharts()
Dim ws As Worksheet, cel As Range

Set ws = ActiveSheet
With ws
For Each cel In .Range(.[A2], .Cells(.Rows.Count, "A").End(xlUp))
With Charts.Add
.ChartType = xlColumnClustered
.SetSourceData Source:=cel.Resize(1, 8), PlotBy:=xlRows
.Location Whe=xlLocationAsNewSheet
.HasTitle = True
.ChartTitle.Characters.Text = cel.Value
With .Axes(xlCategory, xlPrimary)
.HasTitle = True
.AxisTitle.Characters.Text = ws.[A1]
End With
End With
Next cel
End With

End Sub


Any help would be appreciated.
 
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
Creating graphs in VBA Jon Peltier Excel Programming 0 February 2nd 09 10:14 PM
Creating graphs in VBA nir020 Excel Programming 0 February 2nd 09 05:46 PM
Creating Circles on Excel Graphs [email protected] Excel Worksheet Functions 2 February 23rd 07 05:29 PM
Creating two bar graphs Lisa Charts and Charting in Excel 3 December 6th 05 01:41 PM
CREATING GRAPHS Mohammad Mian Excel Programming 4 August 9th 04 12:58 PM


All times are GMT +1. The time now is 09:41 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"