Thread
:
macro "text to column" for excel
View Single Post
#
5
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 7
macro "text to column" for excel
I justed posted the macro that I have built. Also, the text I am trying to
spread across columns contains a name, address, city, state, and zip which
are all separated by commas.
Sub T()
'
' T Macro
' Macro recorded 9/22/2006 by George Crain
'
' Keyboard Shortcut: Ctrl+a
'
Selection.TextToColumns Destination:=cells(1), DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1)
End Sub
Thanks
"Dave Peterson" wrote:
If you want to start in the original location, then try the top suggestion.
If it doesn't work, try posting your code and if you relied on the selection,
post what was in the selection and the selection's address.
wrote:
Dave,
I want the result to start with the cell that I am in. Because I am using
tab delimiteded. It then writes across the columns as needed. Can I email
you directly the macro and have you look at it? And thanks
George
"Dave Peterson" wrote:
Maybe one of these will help:
With Selection
.TextToColumns Destination:=.cells(1), ....
....
With Selection
.TextToColumns Destination:=.cells(1).offset(0, 1), ....
....
I'm not sure where the results should be placed--start in the original
selection, or start in one column over.
wrote:
I want to automate the "text to column" function. I can created the macro;
however, when I rerun the macro on a new row/cell, it writes back to the
previous row/cell and overwrites what is there.
I need the macro to run in the new row/cell where my cursor is, and then not
rewrite back to any previous work.
Thanks
George Crain
--
Dave Peterson
--
Dave Peterson
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]