Quote Originally Posted by PcMax View Post
To avoid errors when there is a text, I added in the cycle:

For i = 1 To UBound(ka, 1) - 1
ka(i, 1) = Val(ka(i + 1, 1)) - Val(ka(i, 1))
Next

Is there an alternative to load the array: ka = Range("C3:C" & r) with only numeric values ?
Just double-checking... you are performing a mathematical operation on a column of cells that contain both numbers and non-numbers??? If so, can you show us an example of data in Column C that is like that and also show us the results you want to see from it?