Charting a mathematical equation using Excel and defined names
Pages in this article
Getting y values
Now that we have gotten a dynamic set of x values it is time to derive results. Again we'll define a named range:
What we need is a mechanism to evaluate the formula in cell B1 using the x values we have available. For this we'll use the fact that Excel accepts ancient xl4 macro functions inside defined names. The function needed is the EVALUATE function, which we use in the name y, local to worksheet Sheet1:
Strange enough, this version of y only seems to work for functions that do not use built-in Excel functions like SIN or COS, using those in the function will cause Excel to compute all constant values, regardless of the x's!
Stephen Bullen has created an almost identical version of this workbook a long time ago, using Excel 5. Look for a download called ChtFrmla.zip. He used a trick to make these functions work by adding "0*x" to the set of y values:
Suddenly, including Excel functions has become possible!
Frequently asked Questions
What is the purpose of using defined names in charting a mathematical equation in Excel?
How can you get dynamic x values for plotting a function in Excel?
What is the role of the EVALUATE function in Excel defined names?
Why does the EVALUATE function not work with built-in Excel functions like SIN or COS initially?
How did Stephen Bullen solve the issue of using Excel functions in the EVALUATE formula?
What is the significance of adding "+0*x" to the formula in the EVALUATE function?
Where can I find an example workbook similar to the one described for charting formulas?
What is the named range "Formula" referring to in the example?
How does Excel's acceptance of xl4 macro functions inside defined names help in this method?
What limitations should be considered when using the EVALUATE function in Excel defined names?


