Hi,
Anyone know what the first value represents in the T2C array?
Selection.TextToColumns Destination:=Range("D1"), DataType:=xlDelimited, FieldInfo:=Array(1, 4)
I've experimented with it, changing it to 2 or 3 , etc.. and I don't see much change.
Any ideas?
TX
First array value in Text2Col
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
First array value in Text2Col
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78493
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: First array value in Text2Col
For xlDelimited, the first value is the column number. For example, if you're going to split the data into 3 columns, you could use
..., FieldInfo:=Array(Array(1, xlTextFormat), Array(2, xlGeneralFormat), Array(3, xlDMYFormat))
to specify that the first column should be treated as text, that Excel may decide the format of the second column, and that the third column contains dates in DMY format.
For xlFixedWidth, the first position specifies the starting position within the text string.
..., FieldInfo:=Array(Array(1, xlTextFormat), Array(2, xlGeneralFormat), Array(3, xlDMYFormat))
to specify that the first column should be treated as text, that Excel may decide the format of the second column, and that the third column contains dates in DMY format.
For xlFixedWidth, the first position specifies the starting position within the text string.
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: First array value in Text2Col
Ah, that clarifies. TX.
I was using T2C to simply clean up text dates, so there was no "splitting" involved; hence the confusion.
I was using T2C to simply clean up text dates, so there was no "splitting" involved; hence the confusion.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.