EnergyModeler
New Member
- Joined
- Aug 16, 2019
- Messages
- 7
Hello,
I am trying to automate a linear regression but want it to work for variable sized data sets. This is what I have for a given set. The Y data always starts at X5 and the X data always starts at Y5, but the length of the column changes. Any ideas as to how I would allow for the regression to fit the data that is input (i.e. have the "$X$106 and $AG$106 change depending on data)?? Thanks for the help!
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$X$5:$X$106"), _
ActiveSheet.Range("$Y$5:$AG$106"), False, False, , "", False, False, _
False, False, , False
I am trying to automate a linear regression but want it to work for variable sized data sets. This is what I have for a given set. The Y data always starts at X5 and the X data always starts at Y5, but the length of the column changes. Any ideas as to how I would allow for the regression to fit the data that is input (i.e. have the "$X$106 and $AG$106 change depending on data)?? Thanks for the help!
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$X$5:$X$106"), _
ActiveSheet.Range("$Y$5:$AG$106"), False, False, , "", False, False, _
False, False, , False