ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   text to column macro (https://www.excelbanter.com/excel-worksheet-functions/71396-text-column-macro.html)

hioncaffiene

text to column macro
 
I am trying to use the text to column tool on over 1200 seperate rows. How
can I make the macro do this? I tried to "record" but it uses the specific
to the original cell information. I need it to say "active cell" then
actually run the formula that is text to column for what ever is in the
current cell. Any body have any ideas. Thanks in advance - this project is
huge and this is only the begining.

CLR

text to column macro
 
You can run the "TextToColumn" feature on an entire column by first
highlighting the entire column, then doing Data TextToColumns etc
etc.............no macro required, unless you specifically want one for
automation purposes.......

hth
Vaya con Dios,
Chuck, CABGx3



"hioncaffiene" wrote:

I am trying to use the text to column tool on over 1200 seperate rows. How
can I make the macro do this? I tried to "record" but it uses the specific
to the original cell information. I need it to say "active cell" then
actually run the formula that is text to column for what ever is in the
current cell. Any body have any ideas. Thanks in advance - this project is
huge and this is only the begining.


hioncaffiene

text to column macro
 
I am working with some rows that need broken while others do not, they are
intermittantly spread through out the sheet. Also, the highlight several
rows, doesn't work because the text is different lengths i.e. names, with no
delimiters. If you have any ideas on how to make the text to column tool
work more accurately with out the macro, I would love to see it. thanks.

"CLR" wrote:

You can run the "TextToColumn" feature on an entire column by first
highlighting the entire column, then doing Data TextToColumns etc
etc.............no macro required, unless you specifically want one for
automation purposes.......

hth
Vaya con Dios,
Chuck, CABGx3



"hioncaffiene" wrote:

I am trying to use the text to column tool on over 1200 seperate rows. How
can I make the macro do this? I tried to "record" but it uses the specific
to the original cell information. I need it to say "active cell" then
actually run the formula that is text to column for what ever is in the
current cell. Any body have any ideas. Thanks in advance - this project is
huge and this is only the begining.


CLR

text to column macro
 
Maybe something like this.........

Sub TextToColumns()
ActiveCell.Select
Selection.TextToColumns Destination:=Selection, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5,
1))
End Sub

This macro will do Data TextToColumns space delimited.........the keys
to keep it to operate in the selected cell only is the above text
"Activecell.select", and "Destination:=Selection".....the rest can be
modified to your needs...

Incidently, the Data TextToColumns feature will also work with only one
cell selected, without having to be under macro control.

Vaya con Dios,
Chuck, CABGx3


"hioncaffiene" wrote:

I am working with some rows that need broken while others do not, they are
intermittantly spread through out the sheet. Also, the highlight several
rows, doesn't work because the text is different lengths i.e. names, with no
delimiters. If you have any ideas on how to make the text to column tool
work more accurately with out the macro, I would love to see it. thanks.

"CLR" wrote:

You can run the "TextToColumn" feature on an entire column by first
highlighting the entire column, then doing Data TextToColumns etc
etc.............no macro required, unless you specifically want one for
automation purposes.......

hth
Vaya con Dios,
Chuck, CABGx3



"hioncaffiene" wrote:

I am trying to use the text to column tool on over 1200 seperate rows. How
can I make the macro do this? I tried to "record" but it uses the specific
to the original cell information. I need it to say "active cell" then
actually run the formula that is text to column for what ever is in the
current cell. Any body have any ideas. Thanks in advance - this project is
huge and this is only the begining.



All times are GMT +1. The time now is 04:50 AM.

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