So essentially I have a large amount of data all in 1 cell seperated by commas. I have multiple rows of this data and with different amounts of data in each cell. Ex: first row may have data seperated by 3 commas, so it will become 3 columns. However, the 2nd row may have data seperated by 10 commas, which will become 10 columns. When I record the macro of transferring my text into columns, I get this code:
Sub Macro2()
'
' Macro2 Macro
'
'
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _
), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array _
(20, 1), Array(21, 1), Array(22, 1), Array(23, 1), Array(24, 1), Array(25, 1), Array(26, 1)) _
, TrailingMinusNumbers:=True
End Sub
Now, as I've mentioned the amount of data varies per row, and the data set will always change. Is there a way to have the array set so it becomes Array(last column, 1) ? Without having to actually enter them all manually to make sure it captures the whole data?