![]() |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 12:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com