Text to Columns (Table of Contents)
Text to Columns in Excel
Text To Column option in excel is available in the Data menu tab under the Data Tools section which is used for separated text available in a cell or column to the columns by splitting them with different criteria. Mostly this process is called delimiting process where we split or separate the text into the column with spaces, commas, any word or else we can use fixed-width option by which text will be placed into cells of the same row from the point we want to break it.
Where can we find this feature in Excel?
The answer to this question is in the Data tab. In the data tab, there is a section of text to column feature (Refer the picture below).
There are two separate features of Text to Column:
This feature splits the text which is being joined by characters, Commas, Tabs, Spaces, Semicolon or any other character such as a hyphen (-).
- Fixed Width:
This feature splits the text which is being joined with spaces with some certain width.
How to Convert Text to Columns in Excel?
Text to Columns in Excel is very simple and easy to create. Let understand the working of Text to Columns in Excel by Some Examples.
Text to Columns in Excel Example #1
Let us take the example of a phone book sample. It has ten contacts in it with their cell numbers and names. Cell Numbers are in general numeric format however the names are in First Name & Last Name Format which are being separated with space.
Below is a snapshot of the data,
What I want to do is separate the first name and last name to see how many people are there in the phonebook with the name of Ajay.
Let us follow the below steps.
- As we want to split the Data in column A into two parts, Insert a column between columns A & B to place the second portion of text. To insert another column select column B and right click on it and then click insert or we can use the shortcut key ( Ctrl with +)
(Tip: If we do not insert another column then the other portion of data will overwrite our data in column B)
- Name the new cell B as the last Name. Select column A as it needs to be separated and Go to Data Tab and click on text to column.
- A dialog box appears which has two options:
Delimited and Fixed width. In the current example, we will use delimited as the number of characters between the first name and last name is not the same in all the cells.
- In a delimited section, click on next and we can see that we have delimiters means the characters by which the text is separated. In the current scenario, it is a space so click on space.
(Tip: We have a little box where we can see how the delimiters will affect our current data or in another term how our output will look like).
- Click on Next and another dialog box appears which allows us to select the format of data we want.
- Again, in the above step, our data is a text and we do not want to change the format so we can click on finish.
(Tip: In this example, we could simply click on finish to see the output)
Below is the result,
Text to Columns in Excel Example #2
I have asked my students to fill out a google form to submit their responses that whether they have finished their homework or not. Below is the data,
The data in Column A is a timestamp which google form automatically records at the time of data is filled. It contains the date & time of the action done. I want to separate the data and time in separate columns.
- Insert a column between Column A & Column B.
- Select Column A and Go to text to Column under Data Tab and click it.
- For the current example, the data in column A has recorded time too which means the data can be divided into AM & PM too. So we will use a feature called “Fixed Width” in Text to columns.
- Click on Next and another dialog box appears, in this dialog Box, it allows us to set field width as how we want to separate the data. Either we can divide it into two columns i.e. Date in Date Format and time in AM PM format or we can have a date in one column, time in another and AM-PM in another one.
- In the dialog box, we will see the procedures of how to create a line, break a line, and move a line. In this example, I want to split the data into two columns not in three as the preview shows above. So I need to delete the line between the second and third column. To do so we double click on the second line.
- When we click on next, the dialog box appears which allows us to change the format of both the columns.
- I want the data in the same format so we can click finish to see the result.
Text to Columns in Excel Example #3
I have the following data with me where in Column B three texts are separated together with a hyphen (-). I want all the three texts in a separate column.
Below is the data,
Let us follow the same procedure but this time there are three texts so we will insert two columns instead of one.
- Select Column C and insert three columns.
- Select Column B, then go to text to Column under Data Tab and click it.
- In the current example, a character separates the data so we will use a delimited feature again.
- As our data is neither separated by Tab, Semi Colon or a comma but it’s a Hyphen (-) and Space. So we will select other and in the other box put “-“in it.
- Click on Finish as we can see in the preview this is the result that we want so we can skip the data format dialog box.
- Below is our desired data,
Explanation of Text to Columns in Excel:
From the above example, it is very much clear that text to column separates text into columns.
It is a very unique feature in excel which separates the text as desired.
Things to Remember
- Always Insert a number of columns equal to the number of data need to be separate in a cell. For Example, if a cell value is A-B-C then two data needs to be separate so insert two columns.
- Identify the delimiter in case of the delimited feature. In “John, David” comma (,) is a delimiter.
- In fixed-width move the arrow to the desired width.
This has been a guide to a Text to Columns in Excel. Here we discuss its uses and how to convert Text to Columns in Excel with excel examples and downloadable excel templates. You may also look at these useful functions in excel –