Hi,
I have a column with the following values:
94,80
94,10
95,60
91,90
93,00
92,50
94,00
95,60
99,50
98,50
100,10
100,70
I'm using the following code
The data obtained are correct.Code:Option Explicit Sub CTest() Dim r As Long Dim ka, k() Dim i As Long r = Range("C" & Rows.Count).End(3).Row + 1 ka = Range("C3:C" & r) ReDim k(1 To UBound(ka, 1), 1 To 1) For i = 1 To UBound(ka, 1) - 1 k(i, 1) = ka(i + 1, 1) - ka(i, 1) Next Range("O3").Resize(UBound(k, 1)) = k End Sub
1 - Wonder if the procedure is properly optimized.
2 - If I use: r = Range("C" & Rows.Count).End(3).Row
Wonder how it must be interpreted
Thanks in advance


Reply With Quote

Bookmarks