Hi everyone
I've just signed up, so apologies if I do something wrong here!!
I'm trying to write some VBA code to produce 8 charts based on 8 rows of data:
data.png
The code, so far, looks like this:
This code almost works. The idea is that I start with cell A1 selected (Data Type) and then when I run the code, it produces 8 charts, however, each chart has an extra series plotted, i.e. the first chart correctly plots the data specified in the range B4:M4, but the second chart plots data for the range B4:M5. This carries on throught the remaining charts, ending with the eighth chart having all 8 sets of data plotted (B4:M11).
What I am trying to achieve is to have each chart plotting only one set of data, i.e the first chart should plot B4:M4, the second should plot B5:M5, the third should plot B6:M6, etc.
I think the problem lies in the way I am specifying the source data in the line:
but I don't know how else to specify both the data labels on the axis and the actual data.
I have also attached a sample spreadsheet, with the 'chart' macro so you can see how it currently works. Any suggestions that anyone can come up with would be greatly appreciated.
Bookmarks