Change errorbar series data from vba

J

jnewby72

I don't know if this can be done, but I'll ask the question.

I have a chart that I want to copy. The chart is an x-y scatter plot.
The data supplied to the original chart and the copied chart are on the
same sheet. The data from the first chart is in the first 60 rows, rows
1-60, and the data in the copied chart is in the next 60 rows, rows
61-120.

I have developed a macro, where I ask the user what rows should be
substituted in the copied chart. I then parse the formula of the data
series and substitute the rows input by the user into the series
formula. This has been successful. Of course the error bars still point
to rows 1-60.

I would like to be able to do something similar. Retrieve the error bar
range reference, change the row references, and substitute the new
range reference.
 
J

Jon Peltier

Unfortunately Excel does not expose the error bar source range to VBA. But
if you know the relationship between the data and the error bars, you can
adjust the (for example) Y value range to reflect the error bar range.

- Jon
 

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