deriving a "formula" from an excel a chart

  • Thread starter Thread starter smokey
  • Start date Start date
S

smokey

Hi

I have a chart with all data both X and Y and the connected line.

I am wondering is there a VBA routine, add-in or built-in function i
Excel that can get the formula for a line?

Thanks

Bil
 
Hi
if this is a straight line with a formula like
y=mX+b

you can use formlas like
m=(Y2-Y1)/(X2-X1)

and after calculating m use
b=Y1-mX1

e.g.
X1:1
Y1: 3
X2:2
Y2:5

->
m=(5-3)/(2-1)=2

->
b=3-2*1=1

->
y=2X+1
 
Gee Frank, you did all that work?

I was going to suggest adding a trendline, showing its formula, and make
sure the display is formatted in a scientific notation with lots of
digits. Another suggestion is LINEST formulas for straight line or
polynomial fits. For polynomials, see Bernard Liengme's tutorial:

http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm

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