hI!
I am tryin to do colum c ( 1 to nth row)
split and put it in column M
coudl you check it what is wrong in this one.
thanks in advance
Sub test()
Dim strTest As String
Dim arrTest As Variant
Dim strColC As String, strColM As String, RW as integer
strTest = [C1]
arrTest = Split(strTest, ",")
For RW = 1 to 46
For i = LBound(arrTest) To UBound(arrTest)
If Len(arrTest(i)) <= 5 Then
strColC = strColC & "," & arrTest(i)
Else
strColM = strColM & "," & arrTest(i)
End If
Next i
RW = RW +1
strColC = Right(strColC, Len(strColC) - 1)
strColM = Right(strColM, Len(strColM) - 1)
Next J
MsgBox strColC & vbCrLf & strColM
End Sub
I am tryin to do colum c ( 1 to nth row)
split and put it in column M
coudl you check it what is wrong in this one.
thanks in advance
Sub test()
Dim strTest As String
Dim arrTest As Variant
Dim strColC As String, strColM As String, RW as integer
strTest = [C1]
arrTest = Split(strTest, ",")
For RW = 1 to 46
For i = LBound(arrTest) To UBound(arrTest)
If Len(arrTest(i)) <= 5 Then
strColC = strColC & "," & arrTest(i)
Else
strColM = strColM & "," & arrTest(i)
End If
Next i
RW = RW +1
strColC = Right(strColC, Len(strColC) - 1)
strColM = Right(strColM, Len(strColM) - 1)
Next J
MsgBox strColC & vbCrLf & strColM
End Sub