Chart for each row of a worksheet

D

Dave Munday

I hope sombody can help with a task I am working on for a colleague at work,
we would like to produce a chart for each row in a worksheet,

we do no know how many rows there will be , each row does have a given
length

an example of the data looks like this

Name Data

A B C D E

Dave Munday 7G 1 2 3 5 4 1 4 4 3 2 5 1 2 5 1 ..... 23 45 12 11 10



For each row as described above we would like to plot the values 23 45 12
11 10 against A B C D E and use Dave Munday 7G as the graph label


I hope I have explained myself enough

thanks for anytime you can spare to help with this issue
 
D

Dave Munday

Many thanks, I will give this a try

Dave



R.VENKATARAMAN said:
try this sub

suppose your data is in A1 to E5. change this to suit you
the chart will be in a separate chart sheet. if you want it embedded in the
data sheet (e.g. sheet1)
change <ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1">
make other changes if necessary

Public Sub test()
Range("A1:E5").Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:E5"),
PlotBy:= xlRows
ActiveChart.Location Where:=xlLocationAsNewSheet

End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top