How to create a graphic for a function

DeepButi

New Member
Joined
Jul 14, 2015
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hi, I used to be a frequent Excel user but now several years away so maybe it's just I cannot find the right answer ...

I would like a method to create a graphic for a function that would NOT require the tipical answer "create a double column sheet with your values" :). I don't want to generate this values, just write the function.

I just want to write the function as text, for example sin(x) and have a graphic display the curve. Of course I will need to fix starting, ending and number of points but this will be easy.

I found an old text explaining a method involving the EVALUATE function on Y axe and DESREF (to create the points) on X axe ... but cannot make it work as the graphic doesn't allow me to use evaluate ... maybe I'm not doing it the proper way. And maybe there is an easy method as the text is nine years old!

Thks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
TIP: Evaluate works if it us used in the name manager. Write your formula in a cell (as text). Use EVALUATE(cellRef) in the name manager. EDIT: + file to be saved as ".xlsm" or ".xlsb" as EVALUATE is an old MACRO4 function.
 
Upvote 0
Thanks *GraH, I know that. I can evaluate the function (written as text) in a cell.

AB
7
sin(x)
x^2+30
cos(x)^2

In the name manager:
x$A$1
eval=if(today();evaluate(A1); )(created when in cell B1)

today() to enforce recalculation. Keep relative reference to be able to use it anywhere.
Now just write =eval on any B cell and it will evaluate the function on its left.

According to the paper I read, now you can use EVALUATE(eval) on the Y axis name ... (and something more complex on the X axis). But unable to understand how, and there are no more details, just examples of graphs displayed! so seems it worked somehow.
 
Upvote 0
Got it working!!

Create the names:

1587290206322.png


Spanish version:
FILA() <--> ROW()
HOY() <--> TODAY()
EVALUAR() <--> EVALUATE()
DESREF() <--> OFFSET()

Create the graphic with the serie values (note that Sheet name is mandatory!!):
1587290385520.png


You can use the same trick for the X-axis value if desired:
1587290455659.png


And that's all folks!

Now change B1 to whatever f(x) you like:
1587290515963.png


1587290547306.png
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top