Chapter 13. Working with Lists

Convert a Column of Text into Multiple Columns

When you need to break a column of text into multiple columns, you can use the TextToColumns method. For example, if a list contains both first and last names in one column, you can use the TextToColumns method to break the list into two columns — one for the first name and one for the last name. When using the TextToColumns method, use the Range object to specify the column you want to parse into multiple columns.

The TextToColumns method provides several optional parameters you can use to specify how to separate the text. Use the Destination parameter to specify the range where VBA should place the results.

A delimiter is a character, such as a comma or space, which indicates ...

Get Excel® Programming: Your visual blueprint™ for creating interactive spreadsheets 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.