ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   text to columns (https://www.excelbanter.com/excel-programming/308815-text-columns.html)

Gabriel[_3_]

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


All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com