Name

range.TextToColumns([Destination]), [DataType], [TextQualifier], [ConsecutiveDelimiter], [Tab], [Semicolon], [Comma], [Space], [Other], [OtherChar], [FieldInfo], [DecimalSeparator], [ThousandsSeparator], [TrailingMinusNumbers])

Synopsis

Breaks a column containing text into several columns.

Argument

Settings

Destination

A Range object specifying the cell where the columns should be placed.

DataType

xlDelimited (default) if the text is delimited; xlFixed if it has a fixed length.

TextQualifier

xlDoubleQuote (default) uses double quotes to indicate text; xlSingleQuote uses single quotes; xlNone evaluates fields to see if they are text or numbers.

ConsecutiveDelimiter

True inteprets consecutive delimiters as a single delimiter.

Tab

True uses tabs as the delimiter.

Semicolon

True uses semicolons as the delimiter.

Comma

True uses commas as the delimiter.

Space

True uses spaces as the delimiter.

Other

True uses OtherChar as the delimiter.

OtherChar

Specifies a character to use as a delimiter.

FieldInfo

An array that describes the data types of fields in the text.

DecimalSeparator

The decimal separator to use when recognizing numbers.

ThousandsSeparator

The thousands separator to use when recognizing numbers.

TrailingMinusNumbers

True interprets numbers followed by - as being negative; False interprets numbers followed by - as a string. Default is False.

The following code breaks the specified column containing semicolon-delimited ...

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.