S.H.A.D.O.
Well-known Member
- Joined
- Sep 6, 2005
- Messages
- 1,915
Good afternoon,
I have a two ranges of data in cells E15:K? And M15:S?
I have a figure in cell A1 that increases by one when new data is added to the bottom of the ranges above.
The code below works and does exactly what I want it to do...
I want to be able to forecast from the bottom of the data up by the figure in cell B1 as opposed to the whole of the data.
So for example, if I had the number 50 in cell B1, I just want it start at the last figure in column E and calculate the FORECAST up on the last 50 numbers.
I hope this makes sense.
Thanks in advance.
I have a two ranges of data in cells E15:K? And M15:S?
I have a figure in cell A1 that increases by one when new data is added to the bottom of the ranges above.
The code below works and does exactly what I want it to do...
Code:
Sub FORECAST_Next_Numbers()
With Application
.ScreenUpdating = False: .Calculation = xlCalculationManual: .DisplayAlerts = False
End With
Range("E10").Resize(1, 7).Formula = _
"=FORECAST(INDIRECT(""B"" & $A1+15),OFFSET(E15,,,$A1,1),OFFSET($B15,,,$A1,1))"
Range("M10").Resize(1, 7).Formula = _
"=FORECAST(INDIRECT(""B"" & $A1+15),OFFSET(M15,,,$A1,1),OFFSET($B15,,,$A1,1))"
Range("E10:S10").Value = Range("E10:S10").Value
Range("E10:K10,M10:S10").NumberFormat = "0"
With Application
.DisplayAlerts = True: .Calculation = xlCalculationAutomatic: .ScreenUpdating = True
End With
End Sub
I want to be able to forecast from the bottom of the data up by the figure in cell B1 as opposed to the whole of the data.
So for example, if I had the number 50 in cell B1, I just want it start at the last figure in column E and calculate the FORECAST up on the last 50 numbers.
I hope this makes sense.
Thanks in advance.