0

I have two columns with data. One column for Y-axis, another for X-axis. How can I create a chart using this data? Range is different (from 10 cells to 3000).

Thanks a lot!

1
  • each column has a different row count, or at different times both of the columns can have different row counts but both columns will always have the same row count as each other? Perhaps Dynamic Named Ranges can help? Commented Dec 3, 2015 at 18:04

1 Answer 1

1

For X and Y axis you have different property .values and .xvalues see more here https://msdn.microsoft.com/en-us/library/office/ff197014.aspx and https://msdn.microsoft.com/en-us/library/office/ff821866.aspx. There is nothing more to tell, but if you dont understand something try to ask.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for help! I have a problem with a range. It differs but it depends on numbShag. I tried to use mainChart.SeriesCollection(1).Values = Worksheets(1).Range("F1:F" & numbShag) but I have an 1004 error.
Solved. Forgot about mainChart.SeriesCollection.NewSeries

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.