Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I have VBA return the trendline types possible for given d.

I have an Excel VBA program which applies each trendline type to data then
chooses the option with the best R^2 value. How can I have the program skip
unavailable options? For instance when I make the data very strange Power and
Exponential regressions are not available. This causes my macro to crash.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I have VBA return the trendline types possible for given d.

Trap the error - provide an error handler?

--
Regards,
Tom Ogilvy

"KTimblin" wrote in message
...
I have an Excel VBA program which applies each trendline type to data then
chooses the option with the best R^2 value. How can I have the program

skip
unavailable options? For instance when I make the data very strange Power

and
Exponential regressions are not available. This causes my macro to crash.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default How do I have VBA return the trendline types possible for given d.

Options are grayed out when you have negative numbers... depending on the
type of regression you are doing.

--
Dana DeLouis
Win XP & Office 2003


"KTimblin" wrote in message
...
I have an Excel VBA program which applies each trendline type to data then
chooses the option with the best R^2 value. How can I have the program
skip
unavailable options? For instance when I make the data very strange Power
and
Exponential regressions are not available. This causes my macro to crash.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default How do I have VBA return the trendline types possible for given d.

Tom has already given you how to deal with your problem. At the same
time, using R-squared is not necessarily the best way to approach the
problem. A polynomial of power 6 will have a R-squared greater than a
polynomial of power 2 (or a linear fit). However, that doesn't
automatically make it a better fit. A linear or 2nd order polynomial
may be more appropriate for describing the data.

--
Regards,

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

In article ,
says...
I have an Excel VBA program which applies each trendline type to data then
chooses the option with the best R^2 value. How can I have the program skip
unavailable options? For instance when I make the data very strange Power and
Exponential regressions are not available. This causes my macro to crash.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match 2 Columns, Return 3rd, Differing Match Types Matt.Russett Excel Worksheet Functions 3 May 11th 10 10:45 AM
How can I hide unused file types from file types list in save dial Estra Q Excel Discussion (Misc queries) 1 December 17th 09 12:36 PM
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" roadsidetree Charts and Charting in Excel 15 June 2nd 09 10:53 AM
Trendline Types Dave Charts and Charting in Excel 2 October 3rd 07 05:39 PM
Types in Add-In Henning Eiben Excel Programming 9 October 21st 04 04:35 PM


All times are GMT +1. The time now is 04:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"