Hey guys i have currently got a macro that converts data from text to columns (by comma delimited) below is the macro.
Sub Text_to_Column()
Application.ScreenUpdating = False
On Error Resume Next
For Each wksht In ActiveWorkbook.Worksheets
For Each col In wksht.Columns
Columns(col.Column).TextToColumns _
Destination:=Cells(1, col.Column), _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, _
Semicolon:=False, _
Comma:=True, _
Space:=False, _
Other:=False, _
FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
Next col
Next wksht
Application.ScreenUpdating = True
End Sub
However this code converted the data type in each columns into general (so all columns types have a general data format), how do i change this so all columns have data type as TEXT (regardless if its a number i still want it as a text). Any help would be appreciated? Thank You
Rasik
Bookmarks