Making charts

S

stendahl_jones

Hi! I am desperatley trying to make a chart. However I do need the code to be
variable so I cannot refer directly to cell address. I cannot understand what
is wrong with my code, I want to make a range for the chart that is 'split
up' but I cannot seem to manage. Can someone perhaps see what is wrong with
this code:

Worksheets("Indata").Range(rng1.Address, rng1.Offset(i, j).Address).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData
Source:=Sheets("Indata").Range("rng1.Address:rng1.Offset(1, 0).Address,
rng2.Address:rng2.Offset(3,0).Address"), PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues =
Sheets("Indata").Range(rng.Offset(0, 1).Address, rng.Offset(0, i).Address)

Please please any help is very much appreciated! I cannot beat this problem
on my own!
 

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

Similar Threads

Reference problems 1
Range 5
Referring to multiple ranges 1
Placement of charts 0
Charts in VB 0
Dynamic chart problem 1
Loop to create charts 1
chart range to include variables - Macro 1

Top