ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How to dynamically change the series range of a chart ? (https://www.excelbanter.com/charts-charting-excel/112875-how-dynamically-change-series-range-chart.html)

ptek

How to dynamically change the series range of a chart ?
 
Hi,

For a chart, each series range are defined by something like :

=sheetname!$B$2:$B$25 (being the data located on column B, ranging
from row 2 to 25, as an example).

I access this (and I can change it) by manually right clicking on the
chart, selecting Source Data, and editing the above.

Is it possible to change the range in function of other cell contents?
That is, imagine I want to define the range of the serie to column B,
row 10 to 20. I would put the starting column value (10) on A1 and the
end column (20) at A2 and somehow, the =sheetname thing would be
updated to =sheetname!$B$10:$B$20 in function of the contents of A1 and
A2.

Can it be done easly ? Or is it needed a macro ? May anyone give me an
example ?

thanks


Don Guillett

How to dynamically change the series range of a chart ?
 
one way is to use a defined name such as myrng and refers to
=OFFSET(Sheet1!$A$1,Sheet1!$F$1,0,Sheet1!$F$2)

--
Don Guillett
SalesAid Software

"ptek" wrote in message
ups.com...
Hi,

For a chart, each series range are defined by something like :

=sheetname!$B$2:$B$25 (being the data located on column B, ranging
from row 2 to 25, as an example).

I access this (and I can change it) by manually right clicking on the
chart, selecting Source Data, and editing the above.

Is it possible to change the range in function of other cell contents?
That is, imagine I want to define the range of the serie to column B,
row 10 to 20. I would put the starting column value (10) on A1 and the
end column (20) at A2 and somehow, the =sheetname thing would be
updated to =sheetname!$B$10:$B$20 in function of the contents of A1 and
A2.

Can it be done easly ? Or is it needed a macro ? May anyone give me an
example ?

thanks




Jon Peltier

How to dynamically change the series range of a chart ?
 
Another way is through a utility such as this one:

http://peltiertech.com/Excel/Charts/ChgSrsFmla.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Don Guillett" wrote in message
...
one way is to use a defined name such as myrng and refers to
=OFFSET(Sheet1!$A$1,Sheet1!$F$1,0,Sheet1!$F$2)

--
Don Guillett
SalesAid Software

"ptek" wrote in message
ups.com...
Hi,

For a chart, each series range are defined by something like :

=sheetname!$B$2:$B$25 (being the data located on column B, ranging
from row 2 to 25, as an example).

I access this (and I can change it) by manually right clicking on the
chart, selecting Source Data, and editing the above.

Is it possible to change the range in function of other cell contents?
That is, imagine I want to define the range of the serie to column B,
row 10 to 20. I would put the starting column value (10) on A1 and the
end column (20) at A2 and somehow, the =sheetname thing would be
updated to =sheetname!$B$10:$B$20 in function of the contents of A1 and
A2.

Can it be done easly ? Or is it needed a macro ? May anyone give me an
example ?

thanks







All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com