Separate Text in Excel

Separating Text in Excel

Texts in Excel can appear in different ways. Maybe there is a text which is joined by some kind of symbol, or the text is like a first name and the last name.

There will be some point in our life where we will want those texts separated. The problem statement is explained above that we will come towards some sort of data where we need to separate those texts from one to another. But how do we separate those texts from one another? There is one very basic way to do it copy the desired text in each desired respective cell. Or, we can use some pre-given excel tools to do so.

How to Separate Text in Excel?

There are two methods to separate Texts in Excel:

  1. Using “Text to Columns in ExcelText To Columns In ExcelText to columns in excel is used to separate text in different columns based on some delimited or fixed width. This is done either by using a delimiter such as a comma, space or hyphen, or using fixed defined width to separate a text in the adjacent columns.read more: which further has its own two bifurcations:
    1. Delimited: This feature splits the text, which is being joined by characters, Commas, Tabs, Spaces, Semicolon, or any other character such as a hyphen (-).
    2. Fixed Width: This feature splits the text, which is being joined with spaces with some certain width.
  2. Using Excel Formulas: We can use formulas like the Len in excelLen In ExcelThe Len function returns the length of a given string. It calculates the number of characters in a given string as input. It is a text function in Excel as well as an inbuilt function that can be accessed by typing =LEN( and entering a string as input.read more to calculate the length of the string and separate the values by knowing the position of the characters.

Let us learn these methods using examples.

You can download this Separate Text Excel Template here – Separate Text Excel Template

Example #1 – Delimiter Method to Separate Text

First things first, where do we find this feature text to columns in excel. It is under the data Tab in the Data Tools section.

Consider the following data,

We want to separate the first name and the last name and have the contents of the last name in the B column.

Below are the steps of separating text in excel –

  1. To do this, select the column containing the data, i.e., A column.


    Using Delimiter Method Step 1

  2. Under Data Tab in the Data Tools section, Click on Text To Columns.


    Using Delimiter Method Step 2

  3. A dialog box appears for text to columns wizard.


    Using Delimiter Method Step 3

  4. As we are going to use the delimiter method first, Select the delimited option and click on next and another dialog box appears.


    Using Delimiter Method Step 5

  5. For the current data, our texts are separated in excel by spaces, so select the Space option as a delimiter ( By default, Excel selects Tab as a delimiter). Click on Next.


    Using Delimiter Method Step 5

  6. We can see that our data preview that our texts are separated with first and last names. Click on Finish to see the result.


    Using Delimiter Method Step 6

  7. We have successfully separated our excel text by using text to column delimiter method.


    Using Delimiter Method Step 7

Example #2 – Using the Fixed Width Method to Separate Text

We already know where the option of text to the column is in Excel. It is in the Data Tab under the data tools section.

Now we consider the following data,

There is a survey company which is conducting a survey for the feedback of a restaurant. The users give their feedback as Good or Bad, but every response is saved by a timestamp, which means with every response, time is recorded, specific Data and time in Hours and minutes.

I need to separate the Date from the time in the data. Below is the data,

Using Fixed Width Method Step 1

Step #1 – We do need to separate the contents of column A, but there is data in column B, so we need to insert another column between column A and column B. To do that, Select Column B and press CTRL + +.

Using Fixed Width Method Step 2

It adds another column between both the columns and shifts the data from previous column B to column C.

Step #2 – Now select the data in Column A, and click on Text to the column under Data Tab in the Data Tools section.

Using Fixed Width Method step 3

A dialog box appears for text to columns wizard.

Using Fixed Width Method step 4

Step #3 – This time, we are using a fixed-width method, so make sure that the fixed method option is selected and click on next. Another Text to Column Wizard dialog box appears.

Using Fixed Width Method step 5

Step #4 – In the data preview, we can see that the data is being separated into three parts, which are Data Time and the meridian, which is AM and PM.

Using Fixed Width Method step 6

We need only data and time, so hover the mouse around the second line and double click on it, and it disappears.

Using Fixed Width Method step 7

Step #5 – Now click on next, another Text to Column Wizard dialog box appears. There you need to click on the Finish button.

Using Fixed Width Method step 8

Now, the data is separated with Date in one column and time in another.

Using Fixed Width Method step 9

Step #6 – Currently, the formatting of the data in column B is not correct, so we need to correct it. Select the contents on column B, and in the Home tab under the numbers section, the default selection is custom. We need to change it to time.

Using Fixed Width Method step 10

Step #7 – Now, we have successfully separated our excel data using the Text to Columns Fixed Width Method.

Using Fixed Width Method step 11

Example #3 – Using Formulas for Separating Text

We can also use excel formulas to separate the text and numbers, which is joined together. Of course, we can remove that data by using Text to columns, but for complex situations, we use formulas for this.

Let us consider the following Data:

Separate Text using formula step 1

We have products in column A with their respective product codes. We need products in one column and product code in another. We want to use formulas to do this.

Step #1- To this, we need to first count the number of digits and separate that much number from the character.

Step #2- We need Product Name in B Column and Product Code in the C column.

Separate Text using formula step 2

Step #3- First, we will separate the digits so that then we can separate the text in excel from the data. In C2, write the following excel formula to separate text.

Separate Text using formula step 4

We use the right to function as we know the numbers are in the right.

Step #4- Now, in Cell B2, write the following Formula,

Separate Text using formula step 5

Step #5- Press Enter, and we have successfully separated our data from Product Name and code by using the Len function.

Separate Text using formula step 6

Step #6- Now drag the respective formulas to cell B6 and cell C6 Respectively.

Separate Text using formula step 7

Things to Remember in Separating Text in Excel (text to column & formula)

  1. If we are using the Text to Columns Method, always make sure that we have an additional column so that the data in any column doesn’t get replaced.
  2. If we are separating Texts in excel by using excel formulas, we need to make sure of the positioning of the characters.

Recommended Articles

This has been a guide to Separate Text in Excel. Here we discuss how to separate text in excel using two methods 1) “Text to Column” (Delimited & Fixed Width) and 2) using Excel Formulas along with practical examples and a downloadable template. You may learn more about excel from the following articles –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *