Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match 2 Columns, Return 3rd, Differing Match Types | Excel Worksheet Functions | |||
How can I hide unused file types from file types list in save dial | Excel Discussion (Misc queries) | |||
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" | Charts and Charting in Excel | |||
Trendline Types | Charts and Charting in Excel | |||
Types in Add-In | Excel Programming |