Hi Nick,
I have found a way, it doesn't use INDIRECT but it let's the chart plot from
a pair of cell addresses in cell A1:A2. It's rather complicated:
1. Define the following names - choose Insert, Name, Define and enter each
of the names below in the Names in workbook box and the formula in the Refers
to box:
Col1 (this formula figures out which column your X data is in but only
works out to column Z as I set it up):
=MATCH(LEFT(Sheet1!$A$1),{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"},0)
Col2 (this formula figures out which column contains your Y data - the
OFFSET function needs numbers, not letter):
=MATCH(LEFT(Sheet1!$A$2),{"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"},0)
H (this formula calculates the height argument for the OFFSET function):
=VALUE(RIGHT(Sheet1!$A$1,LEN(Sheet1!$A$1)-FIND(":",Sheet1!$A$1)-1))
L (this function figures out the starting row of your data)
=VALUE(MID(Sheet1!$A$1,2,FIND(":",Sheet1!$A$1)-2)-1
X
=OFFSET(Sheet1!$A$1,L,Col1-1,H)
Y
=OFFSET(Sheet1!$A$1,L,Col2-1,H)
Now follow Jon instructions for assigning the range names X and Y to the
chart.
1. Select the series on the chart and replace the reference after the !
with X or Y. In 2003 this will automatically change the sheet reference to a
workbook reference, in some earlier versions I believe you needed to type the
entire address over with the workbook name instead of the sheet name.
Now you can select cells A1 and A2 and type in the address as text and the
chart will plot automatically.
You could have defined the names H, L, Col1, and Col2 as spreadsheet cells
where the formulas returned their results.
I tried to substitute all the formula into the X and Y formulas but I either
made a typo or Excel was not happy with them, so I resorted to defining the 4
extra names.
If you need a copy of the workbook let me know.