Hi all,
Can you help me with this code, it used to work but now for some strange reason it doesn't.
What I wanted to do is to trim the values in column I and split it to columns J,K,L and M.
This is the code I was using:
Sub Trimming()
'Trim Sold To Code
Dim arr As Variant
Dim x As Variant
Dim i As Long
Dim j As Long
arr = Range("I2:M" & Cells(Rows.Count, "M").End(xlUp).Row)
For i = LBound(arr, 1) To UBound(arr, 1)
x = Split(arr(i, 5), "/")
For j = LBound(x) To UBound(x)
arr(i, j + 1) = x(j)
Next j
Next i
Range("I2:M" & Cells(Rows.Count, "M").End(xlUp).Row).Value = arr
End Sub
I have attached my sample worksheet.
Thank you very much.
-Andrew
Bookmarks