I am rather new in coding, so I hope there is someone that can help me with this problem. The code is supposed to do the following: Go through each worksheet and split the text (in column A4 and down) into three separate columns. The split into columns is made right, but when playing the macro the code only does it for the active worksheet - and does not loop through all of the worksheets.
Dim wkSheet As Worksheet
For Each wkSheet In Worksheets
Range(Range("a4"), Range("a4").End(xlDown)).Select
Selection.TextToColumns Destination:=Range("A4"), DataType:=xlFixedWidth, _
OtherChar:=":", FieldInfo:=Array(Array(0, 1), Array(10, 1), Array(20, 1))
Range(Range("c4"), Range("c4").End(xlDown)).Select
Selection.TextToColumns Destination:=Range("C4"), DataType:=xlDelimited, _
TextQualifier:=xlNone, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=":", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
1))
Next wkSheet
Highly appreciate any help. Thank you
Moderators Note:- Please follow Forum Rule #3 and use code tags.
- Added this time, but please use them in the future…Thanks.
Bookmarks