View Single Post
  #3   Report Post  
tvanellen
 
Posts: n/a
Default

thank you, this seems to be quite helpful. Nice website

"Tushar Mehta" wrote:

On the question of indirect references. Create named formulas.
Suppose you have data in Book11 sheet1 A1:A5 and sheet2 A1:A10.
Suppose you want to put the charts in another workbook (say Book10) and
you want to specify the various indirect references through cells in
Sheet1: say the workbook name is in A1, the sheet name in A2, the first
cell in A3, and the last cell in A4. Then, in Book10 (the book that
will contain the chart) create a name (Insert | Name Define...)

aRng
=INDIRECT("'["&Sheet1!$A$1&"]"&Sheet1!$A$2&"'!"&Sheet1!$A$3&":"&Sheet1!
$A$4)
[Note carefully the use of both double-quotes and single-quotes.]

Put legitimate values in those cells, say, A1 contains Book11, A2
sheet2, A3 A1 and A4 A5. Create a chart using the named formula. For
how see
Names in Charts
http://www.tushar-
mehta.com/excel/newsgroups/dynamic_charts/names_in_charts.html

Now, the chart will plot [book11]sheet2!A1:A5. Change any of the
values in book10 sheet1 cells A1:A4 and the chart will correctly
reflect the new values. Note that the values must come together to
form a legitimate range reference.

You can also specify the starting point and the number of cells to
plot. Suppose Book10 Sheet1 cell B4 contains the number of cells. In
Book10, create a new named formula
aRng2
=OFFSET(INDIRECT("'["&Sheet1!$A$1&"]"&Sheet1!$A$2&"'!"&Sheet1!$A
$3),0,0,Sheet1!$B$4,1)

and plot it.

The second issue you raise. The only simple way I know of how to do
that works with an embedded cell that only plots data in its parent
worksheet. Just copy the entire worksheet to the other workbook. Now
replace the data in this sheet.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I've made a XY scattergram that I want to copy for use to other workbooks
with other data series. The exact part of the data series to be displayed in
the chart varies between workbooks. In the data series for the chart, I'd
like to include an indirect reference that will define the first and the last
dat point to be displayed. How can I achieve this?

A related question: how can I copy charts beween workbooks in a way that the
reference to the original workbook is not being copied at the same time. I.e.
I want the displayed data to be taken from the workbook I'm copying the chart
to, and not from the workbook I copy the chart from?

Thank you for yr help.