[This followup was posted to microsoft.public.excel.charting with an
email copy to Joe.
Please use the newsgroup for further discussion.]
Yes, in a limited fashion. Named formulas cannot be parameterized.
So, about the best one can do is the following.
Suppose you define a UDF as:
Function YVals(x As Range)
Dim y As Variant, i As Long
ReDim y(1 To x.Cells.Count)
For i = 1 To UBound(y)
y(i) = x(i) ^ 2
Next i
YVals = y
End Function
Then, define an XL name as
YvalsName =yvals(Sheet1!$A$1:$A$12)
Now, plot YvalsName in a chart. As you change A1:A12, the chart will
change.
You can take it a step further. Change the definition of YvalsName to
YvalsName =yvals(OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1))
Now, as you add or delete contiguous data points starting with A1, the
chart will also change.
--
Trouble finding replies to your posts? Use a newsreader. See the
tutorial 'Outlook Express and Newsgroups' on my web site
Regards,
Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions