Hi all,
I have a data type issue here with my code (according to the compiler) at line 7 (For colID = ...).
Sub rcbTrim()
Dim colIDArray
Dim colID
colIDArray = Array("B", "E", "G", "I", _
"K", "M", "O", "Q", "AG", "AI", _
"AK", "AM", "AO", "AQ"
For colID = colIDArray(0) To colIDArray(13)
Columns(colID & ":" & colID).Insert Shift:=xlToRight
Range(colID & "2".FormulaR1C1 = "=TRIM(RC[-1])"
Range(colID & "2".AutoFill Destination:=Range _
(colID & "2:" & colID & "20001", Type:=xlFillDefault
Next colID
End Sub
Please can someone tell me what I'm doing wrong.
Thank you in advance,
Clinton
"The important thing is not to stop questioning." - Albert Einstein
I have a data type issue here with my code (according to the compiler) at line 7 (For colID = ...).
Sub rcbTrim()
Dim colIDArray
Dim colID
colIDArray = Array("B", "E", "G", "I", _
"K", "M", "O", "Q", "AG", "AI", _
"AK", "AM", "AO", "AQ"
For colID = colIDArray(0) To colIDArray(13)
Columns(colID & ":" & colID).Insert Shift:=xlToRight
Range(colID & "2".FormulaR1C1 = "=TRIM(RC[-1])"
Range(colID & "2".AutoFill Destination:=Range _
(colID & "2:" & colID & "20001", Type:=xlFillDefault
Next colID
End Sub
Please can someone tell me what I'm doing wrong.
Thank you in advance,
Clinton
"The important thing is not to stop questioning." - Albert Einstein