ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Making your own trenlines (https://www.excelbanter.com/excel-worksheet-functions/13158-making-your-own-trenlines.html)

Maarten

Making your own trenlines
 
Since I'm working databases that are subject to change, I would like to be
able to make my own trendline formulas. The built-in trendline function of
excel doesn't let me use the trendline formula shown in the graph, and I
don't want to manually change my formulas each time my database changes.

I've been able to make my own linear- and 'power'trendlines as follows:

My linear trendline:
form: y=a*x+b
a=SLOPE(Yrange;Xrange)
b=INTERCEPT(Yrange;Xrange)

Mijn 'Power'trendline:
form: y=a*x^b
a=EXP(INTERCEPT(LN(Yrange);LN(Xrange)))
b=SLOPE(LN(Yrange);LN(Xrange))

So currently I'm looking for the following two:
Logarithmic trendline in the form:
y=a*Ln(x)+b
Exponential trendline in the form:
y=a*e^(b*x)

Thanks in advance,

Maarten


Tushar Mehta

I'm surprised you figured out the first two and then got stumped by the
last two.

y=a*ln(x)+b is of the same form as y=a*z+b!

So, a=Slope(y,ln(x)), and b=intercept(y,ln(x))

The other equation, y=a*exp(b*x), can be rewritten as
ln(y)=ln(a) + ln(exp(b*x)) or
ln(y)=ln(a) + b*x

So, a=exp(intercept(ln(y),x)) and b=slope(ln(y),x)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Since I'm working databases that are subject to change, I would like to be
able to make my own trendline formulas. The built-in trendline function of
excel doesn't let me use the trendline formula shown in the graph, and I
don't want to manually change my formulas each time my database changes.

I've been able to make my own linear- and 'power'trendlines as follows:

My linear trendline:
form: y=a*x+b
a=SLOPE(Yrange;Xrange)
b=INTERCEPT(Yrange;Xrange)

Mijn 'Power'trendline:
form: y=a*x^b
a=EXP(INTERCEPT(LN(Yrange);LN(Xrange)))
b=SLOPE(LN(Yrange);LN(Xrange))

So currently I'm looking for the following two:
Logarithmic trendline in the form:
y=a*Ln(x)+b
Exponential trendline in the form:
y=a*e^(b*x)

Thanks in advance,

Maarten



Maarten

Thanks a lot for your help.. I guess I haven't been drinking enough coffee
today ;)

"Tushar Mehta" schreef:

I'm surprised you figured out the first two and then got stumped by the
last two.

y=a*ln(x)+b is of the same form as y=a*z+b!

So, a=Slope(y,ln(x)), and b=intercept(y,ln(x))

The other equation, y=a*exp(b*x), can be rewritten as
ln(y)=ln(a) + ln(exp(b*x)) or
ln(y)=ln(a) + b*x

So, a=exp(intercept(ln(y),x)) and b=slope(ln(y),x)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions




All times are GMT +1. The time now is 06:10 PM.

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