Retrieve a range chart through macro

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I am trying to add a new series in a graph through macro.

Range of the new series is similar to the other series already plotted in the graph.

Eg. range of series 1: A5:A20 & B5:B20
and range of the new series will be: A5:A20 & C5:C20

The problem is range of the series 1 is dynamic and hence I need to retrieve the range in the macro and then make necesarry changes and assign to the new series.
I am able to retrieve only the values but not the range (A5:A20 & B5:B20).

Does anyone know how to retrieve the range?

Thanks


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I think you can loop thru series collection. See if this helps in any form
https://ccm.net/forum/affich-281219-changing-cell-ranges-in-all-series-of-a-graph