G'day guys!
Need column P excluded from the following script:
The purpose of the code is to trim all cells to 28 characters, but column P needs to be excluded for my purposes. I don't understand the code very well so I'm not sure what to do.
Cheers!
Need column P excluded from the following script:
Code:
' 12. Trim all cells to 28 characters
Dim ws As Worksheet, c As Range
For Each ws In Worksheets
For Each c In Intersect(ws.UsedRange, ws.Cells(1, 1).EntireRow)
On Error Resume Next
ws.Columns(c.Column).TextToColumns Destination:=c, DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 2), Array(28, 9))
On Error GoTo 0
Next c
Next ws
The purpose of the code is to trim all cells to 28 characters, but column P needs to be excluded for my purposes. I don't understand the code very well so I'm not sure what to do.
Cheers!