Microsoft Office Tutorials and References
In Depth Information
19.3.47 TextToColumns Method
xlTextValues = 2
xlLogical = 4
xlErrors = 16
End Enum
For instance, the code:
selects only the cells with text (as opposed to numbers) within the range A1:D10.
19.3.47 TextToColumns Method
This method parses a column (or columns) of cells that contain text into several columns. The
syntax is:
RangeObject .TextToColumns( Destination , DataType , _
TextQualifier , ConsecutiveDelimiter , Tab , Semicolon , _
Comma , Space , Other , OtherChar , FieldInfo )
Note that all of the parameters to this method are optional.
The Destination parameter is a Range object that specifies where to put the results of the
conversion. If the Range object represents more than a single cell, then the starting point for the
destination is the upper-left cell in that range.
The DataType parameter specifies the format of the text to be split into columns. It can be one of
the following XlTextParsingType constants:
Enum XlTextParsingType
xlDelimited = 1 ' Default
xlFixedWidth = 2
End Enum
The TextQualifier parameter is the text qualifier. It can be one of the following
XlTextQualifier constants:
Enum XlTextQualifier
xlTextQualifierNone = -4142
xlTextQualifierDoubleQuote = 1 ' Default
xlTextQualifierSingleQuote = 2
End Enum
The ConsecutiveDelimiter parameter should be set to True to have Excel consider
consecutive delimiters as one delimiter. The default value is False .
There are several parameters that require that the DataType be xlDelimited and, when set to
True , indicate that Excel should use the corresponding character as the text delimiter. They are
described in the following list (all default values are False ):
Set to True to use the tab character as delimiter.
Search JabSto ::

Custom Search