I have this macro to run a regression on data.
Sub Regression()
'
' Regression Macro
'
'
Application.DisplayAlerts = False
Sheets("Data").Select
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$B$3:$B$" & Range("B" & Rows.Count).End(xlUp).Row), _
ActiveSheet.Range("$E$3:$E$" & Range("E" & Rows.Count).End(xlUp).Row), False, True, , "Data", False, _
False, False, False, , False
Application.DisplayAlerts = True
End Sub
But how do I produce the output of the regression on to a specific sheet for instance called "results"? At the moment the regression produces the results on a new sheet everytime but this is not ideal.
Finally, I need a way that the macro picks up certain data from the regression results and pastes this into a final "history sheet". Everytime the macro is run the sheet keeps adding the results so it accumulates the outcome in a table of history? Any ideas
Thanks
Sub Regression()
'
' Regression Macro
'
'
Application.DisplayAlerts = False
Sheets("Data").Select
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$B$3:$B$" & Range("B" & Rows.Count).End(xlUp).Row), _
ActiveSheet.Range("$E$3:$E$" & Range("E" & Rows.Count).End(xlUp).Row), False, True, , "Data", False, _
False, False, False, , False
Application.DisplayAlerts = True
End Sub
But how do I produce the output of the regression on to a specific sheet for instance called "results"? At the moment the regression produces the results on a new sheet everytime but this is not ideal.
Finally, I need a way that the macro picks up certain data from the regression results and pastes this into a final "history sheet". Everytime the macro is run the sheet keeps adding the results so it accumulates the outcome in a table of history? Any ideas
Thanks