montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 986
- Office Version
- 2010
- Platform
- Windows
Hello , Hoping you got good weekend .
Definitely, I realize this is probably something obvious I'm missing.
For [counter] = [start] to [end]
DO SOMETHING
Next
The same formula must be entered in the successive cells columns, but one of the reference in the formula must be incremented By one row after the all array have been read.
The reading area to apply the formula contains a
DYNAMIC ARRAY
of data, from A4 to the end of G The formula INDEX,LINEST of each Column
Test 1
The interval here is: 8……………..Column I or #9
(B5:B12,$A$4:$A$11^{1,2,3}),1,4))) Results = (I4:N4)
(B6:B13,$A$4:$A$11^{1,2,3}),1,4))) Results = (I5:N5)
(B7:B14,$A$4:$A$11^{1,2,3}),1,4))) Results = (I6:N6)
(B8:B15,$A$4:$A$11^{1,2,3}),1,4))) Results = (I7:N7
(B9:B16,$A$4:$A$11^{1,2,3}),1,4))) Results = (I8:N8)
(B10:B17,$A$4:$A$11^{1,2,3}),1,4))) Results = (I9:N9)
Test 2
The interval here is:9………………… Column P or #16
(B5:B13,$A$4:$A$12^{1,2,3}),1,4))) Results = (P4:U4)
(B6:B14,$A$4:$A$12^{1,2,3}),1,4))) Results = (P5:U5)
(B7:B15,$A$4:$A$12^{1,2,3}),1,4))) Results = (P6:U6)
(B8:B16,$A$4:$A$12^{1,2,3}),1,4))) Results = (P7:U7)
(B9:B17,$A$4:$A$12^{1,2,3}),1,4))) Results = (P8:U8)
(B10:B18,$A$4:$A$12^{1,2,3}),1,4))) Results = (P9:U9)
if any result match, like Pier1 on I, with Pier1 on B or C etc. then highlight and count on I2 and J, and L etc. to the end.
The argumente ,$A$4:$A$11^{1,2,3}),1,4 increase by 1 unit until 35
Workbook is uploaded.
Thank you for reading this post, I really appreciate your kindness.
this is what I expect
This bellow is the wrong result after I tried the loop
and this is the code I work on:
sorry where is the bottom to upload the workbook. sorry.
Definitely, I realize this is probably something obvious I'm missing.
For [counter] = [start] to [end]
DO SOMETHING
Next
The same formula must be entered in the successive cells columns, but one of the reference in the formula must be incremented By one row after the all array have been read.
The reading area to apply the formula contains a
DYNAMIC ARRAY
of data, from A4 to the end of G The formula INDEX,LINEST of each Column
Test 1
The interval here is: 8……………..Column I or #9
(B5:B12,$A$4:$A$11^{1,2,3}),1,4))) Results = (I4:N4)
(B6:B13,$A$4:$A$11^{1,2,3}),1,4))) Results = (I5:N5)
(B7:B14,$A$4:$A$11^{1,2,3}),1,4))) Results = (I6:N6)
(B8:B15,$A$4:$A$11^{1,2,3}),1,4))) Results = (I7:N7
(B9:B16,$A$4:$A$11^{1,2,3}),1,4))) Results = (I8:N8)
(B10:B17,$A$4:$A$11^{1,2,3}),1,4))) Results = (I9:N9)
Test 2
The interval here is:9………………… Column P or #16
(B5:B13,$A$4:$A$12^{1,2,3}),1,4))) Results = (P4:U4)
(B6:B14,$A$4:$A$12^{1,2,3}),1,4))) Results = (P5:U5)
(B7:B15,$A$4:$A$12^{1,2,3}),1,4))) Results = (P6:U6)
(B8:B16,$A$4:$A$12^{1,2,3}),1,4))) Results = (P7:U7)
(B9:B17,$A$4:$A$12^{1,2,3}),1,4))) Results = (P8:U8)
(B10:B18,$A$4:$A$12^{1,2,3}),1,4))) Results = (P9:U9)
if any result match, like Pier1 on I, with Pier1 on B or C etc. then highlight and count on I2 and J, and L etc. to the end.
The argumente ,$A$4:$A$11^{1,2,3}),1,4 increase by 1 unit until 35
Workbook is uploaded.
Thank you for reading this post, I really appreciate your kindness.
this is what I expect
This bellow is the wrong result after I tried the loop
and this is the code I work on:
VBA Code:
Sub ind()
Range("I4:N33").Formula = "=trunc(abs(INDEX(LINEST(B5:B12,$A$4:$A$11^{1,2,3}),1,4)))"
End Sub
Sub Mon()
Dim x As Integer, y As Integer, lastrow As Long
Dim k As Integer, m As Integer
lastrow = Cells(Rows.Count, 4).End(xlUp).Row
For x = 4 To lastrow
For y = 2 To 7
Cells(x, 7 + y).Formula = "=trunc(abs(INDEX(LINEST(B5:B12,$A$4:$A$11^{1,2,3}),1,4)))"
Next y
Next x
For k = 4 To lastrow
For m = 2 To 7
Cells(k, 14 + m).Formula = "=trunc(abs(INDEX(LINEST(B5:B12,$A$4:$A$12^{1,2,3}),1,4)))"
Next m
Next k
End Sub