Thread: text to columns
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gabriel[_3_] Gabriel[_3_] is offline
external usenet poster
 
Posts: 17
Default text to columns

Hi,

I want to write a vba macro that formats all the UsedColumns in an
activesheet. The output will be two columns for each initial
UsedColumn. There is an empty column between each initial UsedColumn.


###
For Each usedrange In ActiveSheet

UsedRange.TextToColumns Destination:=???,
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar :="=", FieldInfo:=Array(Array(1, 1), Array(2,
1)), TrailingMinusNumbers:=True
'1st Columns("???).EntireColumn.AutoFit
'2nd Columns("???").EntireColumn.AutoFit
'2nd Columns("???").NumberFormat = "#,##0.00"
Next usedrange

###

Are there any suggestions?
Thank you - Gabriel