If you want to see some code, then I'd suggest you record a macro when you do
one column the way you want.
Man, you're almost as absent-minded as me sometimes, the title says
Excel 2003.
OK, about the macro, I have a question, the recorded macro looks like
this
Sub Convert2Text()
'
' Convert2Text Macro
'
Selection.TextToColumns Destination:=Range("AH1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False,
FieldInfo _
:=Array(1, 2), TrailingMinusNumbers:=True
End Sub
Now, what I wanted to do is, to expand the Range, so, change the above
to something like
Sub Convert2Text()
'
' Convert2Text Macro
'
Selection.TextToColumns Destination:=Range("AI1..FA255"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False,
FieldInfo _
:=Array(1, 2), TrailingMinusNumbers:=True
End Sub
But
VB does not like it, could I use a range like that? Or syntax
error? Tks.
NickName wrote:
Dave Peterson wrote:
If you have 300 columns of data, you're not using xl2003 or below.
But data|text to columns only works on a single column at a time.
Yes, I know that.
Maybe you could have a macro that did what you needed. So you could select the
range to fix and then invoke that macro.
Please refer to my OP. I've never used Excel macro before, not an
extensive Excel user. Thks.
NickName wrote:
Dave Peterson wrote:
Select your range (but it has to be a single column) of 200 cells.
Then click on Data|Text to columns.
And follow the wizard.
No. You did not answer the question. The data sets to be formatted as
"Text" overlaps many rows and many columns. No problem of doing it by
hand (manually), however, that would be silly if you have, say, 300
columns and 500 rows to do, formatting the whole range using datatype
of "Text" does not work neither, very weird.
NickName wrote:
Bob Umlas wrote:
Text to Columns is something applied to ROWS, not Columns. It distributes
data in several rows (or one) across columns, so something like
1,2,3,4,5,6 would get distributed to columns A:F if the comma were the
delimiter, for example.
Your question doesn't really apply here, unless I'm misunderstanding the
question.
Then what's an efficient way to apply the "Text to Columns" feature to
many
many (say, 200) rows in Excel 2003? btw, the naming of this feature is
misleading, it would be more accurate if named something like "Convert
to Text" regardless of Column or Row but forget about this.
Also, copying a cell's format and past special (for the format to a
range of cells) would not work, weird.
"NickName" wrote in message
oups.com...
Hi,
What is an efficient way to apply the "Text to Columns" feature to many
many (say, 200) columns in Excel 2003? A macro? If so, can I see some
sample code for that?
TIA.
--
Dave Peterson
--
Dave Peterson
--
Dave Peterson