ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Adding a certain text label in a excel chart (https://www.excelbanter.com/charts-charting-excel/47328-adding-certain-text-label-excel-chart.html)

Tim

Adding a certain text label in a excel chart
 
I am plotting in regularly basis a certain set of data in excel.
Based on some data analysis this set of data has to be fitted to these
equations:
y = 1/x^a (1) and /or
y = b/x^c (2)
from data analysis, constants a, b and c are found and are placed lets say
in cells A1, B1, C1.
On my graph, I am putting then two small text labels where the real equation
is displayed: smth. like: y = 1/ x^3.45 and / or y = 0.256 / x^3.12 The
whole process is similar with excel curve fitting, when the €śshow equation on
chart€ť is checked.

Thank you in advance
My question is: Can I somehow €śautomate€ť the procedure of creating and
putting these text labels on excel graph.


Jon Peltier



Tim wrote:

I am plotting in regularly basis a certain set of data in excel.
Based on some data analysis this set of data has to be fitted to these
equations:
y = 1/x^a (1) and /or
y = b/x^c (2)
from data analysis, constants a, b and c are found and are placed lets say
in cells A1, B1, C1.
On my graph, I am putting then two small text labels where the real equation
is displayed: smth. like: y = 1/ x^3.45 and / or y = 0.256 / x^3.12 The
whole process is similar with excel curve fitting, when the €śshow equation on
chart€ť is checked.

Thank you in advance
My question is: Can I somehow €śautomate€ť the procedure of creating and
putting these text labels on excel graph.



Jon Peltier

Tim -

Build the label in another cell (for example, D1):

="y = "&B1&" / x^" & C1

Then select the chart, press the equals key, and click on D1. Excel inserts a
textbox into the chart which is linked to this cell.

To get the appropriate code for automating this process, run the macro recorder
while doing the above.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Tim wrote:

I am plotting in regularly basis a certain set of data in excel.
Based on some data analysis this set of data has to be fitted to these
equations:
y = 1/x^a (1) and /or
y = b/x^c (2)
from data analysis, constants a, b and c are found and are placed lets say
in cells A1, B1, C1.
On my graph, I am putting then two small text labels where the real equation
is displayed: smth. like: y = 1/ x^3.45 and / or y = 0.256 / x^3.12 The
whole process is similar with excel curve fitting, when the €śshow equation on
chart€ť is checked.

Thank you in advance
My question is: Can I somehow €śautomate€ť the procedure of creating and
putting these text labels on excel graph.




All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com