I have been reading around the forum trying to figure out the solution to this, but was unable to, so I thought I would join and post!
I am doing cash projections for work, and I use a regression to do them. I want to make this work via macro in order to avoid doing it every month. I would like to have my Macro use a Y and X range that automatically goes to the bottom of the data (i.e. Month 1 to row 54, month 2 to row 55, etc. or wherever the end of the data happens to be)
The regression output needs to have "labels" checked.
My X and Y values come from the worksheet called "Regression Data"
The Y data is currently C1:C54
The X data is currently D1:S54
(Rows will be added to these columns each month)
The output is on the worksheet "Regression Output"
The Output range is just this entire worksheet. (1:1048576)
I attempted to simply record the macro, but kept getting errors about having no "Y" data, and when I looked at the code, I was unable to fix this and it did not appear that the macro was recording my input of the data range.
I am not sure if this will happen automatically, but the new regression (ran via macro) needs to simply replace the old macro (i.e. go right on top of it, with the same data in the same cells)
I will post my code below, if anyone is able to help me out with this. I would greatly appreciate it! Thank you!
Please Login or Register to view this content.
Bookmarks