In sub zx
Declare a As a Range
Set a= the entire column of cells
ReDim v to a.Count rows and 2 columns (Array(RowCount-1, 1))
The j assignment is fine and the first v() assignment only needs the a.Cells(index) adjusted

This line[vba]v(i, 2) = Val(Mid(a(i - 1), j + 1)) [/vba] Should read [vba]v(i, 2) = Val(Trim(Right(a.Cells(i), j))) [/vba]