You could use LINEST to calculate the coefficients in the worksheet from the
data. Bernard has a simple explanation:
http://people.stfx.ca/bliengme/ExcelTips/Polynomial.htm
while Tushar has gone into a great amount of detail:
http://tushar-mehta.com/publish_trai...nalysis/16.htm
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
"Arnie" wrote in message
...
OK. I recorded a macro that adds a trendline for a series (log in my
case),
copies the equation and pastes it to the edge of the chart, then clears
the
trendline. Maybe that will do it? This is just an example and will need
to
be cleaned up for your purpose:
Sub No_trendline()
'
' No_trendline Macro
' Macro recorded 8/31/2007 by a2holder
'
'
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLogarithmic,
Forward _
:=0, Backward:=0, DisplayEquation:=True,
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
ActiveChart.ChartArea.Select
ActiveChart.Paste
ActiveChart.SeriesCollection(1).Trendlines(1).Sele ct
Selection.Delete
End Sub
--
n00b lookn for a handout :)
"Zoltan" wrote:
What if I do not want them to go away? I am using them for calculations
(the
equation of them), so I need them. I just do not want to confuse the user
by
the lots of trendlines on the chart. Showing them the data points is
enough.
Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.
I hope there is another way.
Thanks in advance,
Zoltan
"JLGWhiz" wrote:
Not sure about the visible property for trendlines but this will make
them go
away.
Charts("Chart1").SeriesCollection(1).Trendlines.De lete
"Zoltan" wrote:
Hello,
I have several charts and several trendlines on them. How can I hide
the
trendlines (make them invisible)from VB code?
Thanks in advance for the help,
Zoltan