I need to run a text to columns MACRO on a range, which varies based on the data imported. I have the split vba already, simply by recording it, but it gives me a "no data to parse" error when the column is blank. There could be 2 columns all the way to 10, so I need to have the vba ignore the "split text to columns" if the column is blank.
Fairly new with vba, so the code is basic, but it does not to be complex. Here is the split that I have recorded for one of the columns:
Columns("C:C").Select
Selection.TextToColumns Destination:=Range("C1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=":", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
It also splits columns E, G, I, and K