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 the delimiting process, where we split or separate the text into the column with spaces, commas, any word, or else we can use a 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. There is a section of text to column feature (Refer to the picture below).
There are two separate features of Text to Column:
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.
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,
I want to 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 the 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 the 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 other terms, 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 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 to whether they have finished their homework. Below is the data,
The data in Column A is a timestamp that 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 into 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; it allows us to set field width as how we want to separate the data in this dialogue box. 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 columns. 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 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 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 the 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 we want to 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 that need to be separated in a cell. For Example, if a cell value is A-B-C, then two data need to be separate so insert two columns.
- Identify the delimiter in the case of the delimited feature. In “John, David”, the comma (,) is a delimiter.
- In fixed-width, move the arrow to the desired width.
This has been a guide to 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 –