4
43fan
Thanks to all of those who replied. Forecast will do exactly what I'm
looking for, but I'm having a tough time converting it into VBA.
I read values in from a text file, storing them in arrays. These values are
placed in cells on a worksheet as well.
If I use the worksheet function forecast(), in a worksheet, it looks
something like this:
FORECAST(0,$B$28:$B29,L$28:L29)
That's for the first value.
The next value would increase B29 to B30, and L29 to L30. Like this:
FORECAST(0,$B$28:$B30,L$28:L30)
When I go to insert this into my VBA programming though, I'm having a hard
time figuring out how to do it. I have the values I need both already on
the worksheet, as well as still in the array.
I tried doing something like this:
Worksheets(sheet).Cells(row, column) = Application.Forecast(0,
Worksheets(sheet).Cells(Row+3,21):Worksheets(sheet).Cells(Row+3,j),
Val(.ArrayVal(j)))
But it doesn't like this at all.
Help?????
looking for, but I'm having a tough time converting it into VBA.
I read values in from a text file, storing them in arrays. These values are
placed in cells on a worksheet as well.
If I use the worksheet function forecast(), in a worksheet, it looks
something like this:
FORECAST(0,$B$28:$B29,L$28:L29)
That's for the first value.
The next value would increase B29 to B30, and L29 to L30. Like this:
FORECAST(0,$B$28:$B30,L$28:L30)
When I go to insert this into my VBA programming though, I'm having a hard
time figuring out how to do it. I have the values I need both already on
the worksheet, as well as still in the array.
I tried doing something like this:
Worksheets(sheet).Cells(row, column) = Application.Forecast(0,
Worksheets(sheet).Cells(Row+3,21):Worksheets(sheet).Cells(Row+3,j),
Val(.ArrayVal(j)))
But it doesn't like this at all.
Help?????
