X-axis variable reference

G

Guest

Hi! I am having trouble with constructing an x-axis in my macro for excel.
since the x-axis changes all the time I want to have a dynamic reference. The
code now is:

ActiveChart.SeriesCollection(1).XValues = rng1.Address rng1.Offset(i,
0).Address

As you can see the right hand side is incorrect. However I do not know how
to refer to the cells. Please help me out on this one!!!!
 
G

Guest

ActiveChart.SeriesCollection(1).XValues = rng1.parent.Range(rng1, _
rng1.Offset(i,0)).Address(1,1,xlA1,True)
 

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