Converting Text in Excel

Converting Text in Excel

Have to ever had to convert text in an Excel spreadsheet into columns? Did you receive or already have files where full names are used and you need to separate them to first and last name? Today I found myself needing to do this very thing so I thought I would share my tips on how to achieve this.

Split names by using the Convert Text to Columns Wizard

There are many ways to convert text to columns in Excel and this blog aims to cover the two most common methods.  - How to Use the Convert Text to Columns Wizard to separate simple cell content, such as first names and last names, into different columns.

Full name First name Last name
Syed Abbas Syed Abbas
Molly Dempsey Molly Dempsey
Lola Jacobsen Lola Jacobsen
Diane Margheim Diane Margheim

Depending on the way your data is arranged, you can split the cell content based on a delimiter, such as a space or a character (such as a comma, a period, or a semicolon), or you can split it based on a specific column break location within your data.

What do you want to do?

  • Split content based on a delimiter
  • Split cell content based on a column break

Split space-delimited content

Use this method if your names have a delimited format, such as "First_name Last_name" (where the space between First_name and Last_name is the delimiter) or "Last_name, First_name" (where the comma is the delimiter).

1
2
3
4
A
Syed Abbas
Molly Dempsey
Lola Jacobsen
Diane Margheim

1 - Select the range of data that you want to convert.

2 - On the Data tab, in the Data Tools group, click Text to Columns.

Excel Text to Columns

3 - In Step 1 of the Convert Text to Columns Wizard, click Delimited, and then click Next.

4 - In Step 2, select the Space check box, and then clear the other check boxes under Delimiters.

The Data preview box shows the first and last names in two separate columns.

Excel Data Preview

5 - Click Next.

6 - In Step 3, click a column in the Data preview box and then, under Column data format, click Text.

Repeat this step for each column in the Data preview box.

7 - If you want to insert the separated content into the columns next to the full name, click the icon to the right of the Destination box, and then select the cell next to the first name in the list (B2, in this example).

Excel Column data format

Important    If you do not specify a new destination for the new columns, the split data will replace the original data.

8 - Click the icon to the right of the Convert Text to Columns Wizard.

convert column to text

9 - Click Finish.

Split character-delimited content

1
2
3
4
A
Abercrombie,Kim
Cavaglieri,Giorgio
Ito,Shu
Philips,Carol

1 - Select the range of data that you want to convert.

2 - On the Data tab, in the Data Tools group, click Text to Columns.

Excel Text to Columns

3 - In Step 1 of the Convert Text to Columns Wizard, click Delimited, and then click Next.

4 - In Step 2, under Delimiters, select the Comma check box.

The Data preview box displays the first names and last names in two separate lists.

convert text wizard excel

5 - Click Next.

6 - In Step 3, click a column in the Data preview box and then, under Column data format, click Text.

Repeat this step for each column in the Data preview box.

7 - If you want to show the separated content in the columns next to the full name, click the icon to the right of the Destination box, and then select the cell next to the first name in the list (B2, in this example).

Excel Format Data

Important    If you do not specify a new destination for the new columns, the divided data will replace the combined data.

8 - Click the icon to the right of the Convert Text to Columns Wizard.

convert column to text

9 - Click Finish.

Split cell content based on a column break

You can also customize how you want your data to be separated by specifying a fixed column break location. As an example, the data you are importing may have "padding" between columns.

For example, a column containing first names may allow up to 10 characters, and a column containing last names may allow up to 15 characters. Any unused characters for each column may be filled with spaces. So, in the text file that you are importing, the name Lola Jacobsen may appear as Lola (followed by 6 spaces) Jacobsen (followed by 7 spaces).

1 - Select the cell or range of cells that contains the data that you want to split.

2 - On the Data tab, in the Data Tools group, click Text to Columns.

Excel Text to Columns

3 - In Step 1 of the Convert Text to Columns Wizard, click Fixed Width, and then click Next.

4 - In the Data preview box, drag a line to indicate where you want the content to be divided.

excel columns wizard

Tip    To delete a line, double-click it.

5 - Click Next.

6 - In Step 3, select a column in the Data preview box and then, under Column data format, click a format option.

Repeat this step for each column in the Data preview box.

7 - If you want to show the split content in the columns next to the full name, click the icon to the right of the Destination box, and then click the cell next to the first name in the list.

Excel Format Data

Important    If you do not specify a new destination for the new columns, the divided data will replace the original data.

8 - Click the icon to the right of the Convert Text to Columns Wizard.

Excel Convert Wizard b2

9 - Click Finish.

For more Tips & Tricks, please read our blog - Directly Speaking here!

No Comments Yet.

Leave a comment

You must be Logged in to post a comment.