If all that exists on the worksheet is your data, we can write code that
plots each row of the used range, as this macro does:
Sub OneChartPerRow()
Dim rCat As Range
Dim rVal As Range
Dim rUsed As Range
Dim iRow As Long
Dim cht As Chart
Set rUsed = ActiveSheet.UsedRange
Set rCat = rUsed.Rows(1)
For iRow = 2 To rUsed.Rows.Count
Set rVal = rUsed.Rows(iRow)
Set cht = Charts.Add
cht.Name = rVal.Cells(1, 1)
With cht
.SetSourceData Source:=Union(rCat, rVal)
.HasTitle = False
.HasTitle = True
With .ChartTitle
.Text = rVal.Cells(1, 1)
End With
End With
Next
End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
rabidchild wrote:
> Hi
>
> I have a worksheet with about 150 rows and 50 columns. I would like to
> create a bar chart for each rows worth of data on a seperate worksheet,
> using the column headers as the labels on the x axis and the cell
> contents as the y axis (with the first cell in each row as the chart
> title).
>
> Is there a way of automatically generating all these graphs? I am
> currently creating them individually.
>
> Thanks
>
> RC
>
>
Bookmarks