I Have a column that need to be split into multiple columns for which the macro works fine. one of those columns have huge numbers and they need to be text when using texttocolumns to conserve the numbers from rounding. according to documentation text
I only have to specify this in fieldInfo but it doesn’t work. for example when I set the forth column to be text. the function just makes the first one text regardless of what number I determine in the array. Any work around this or anything to keep in mind. when giving filedinfo an array specifying the format of all columns it works but I can’t use this solution because I need somecolumn to not be geenralformat and keep the default type like date or numbers.
Sub Macro1()
'
' Macro1 Macro
'
'
Range("A1:A2").Select
Range("A2").Activate
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(4, 1)), TrailingMinusNumbers:= _
True
MsgBox "here"
End Sub
example of data
tip, 122098344989494940 , UyS, 11/12/2023
ip, 12209834498903840943494940 , UTS, 11/12/2024