Excel Divide Cell (Table of Contents)
Introduction to Divide Cell in Excel
When we work with the text files in excel, it has all the data in the single row itself instead of having it in different columns. The data, most of the times, is aligned in a single row with some delimiter or separator in it (such as comma, space, etc.). If you open such files in Excel, you’ll not get the data populated across columns for different attributes, which is a problem in its own ways. It makes dividing the cells into different columns extremely important, and that is exactly what we will walk you through in this article.
Data Structure in a Text File:
The data is comma-separated if you see the below screenshot and has the first row as column headers. Below that, there is one blank row and then the data values that are comma-separated as well. This type of data is called as delimited data or data with delimiters (in this case, comma as a delimiter).
Let us see the other data set which we are going to use.
This data set simply consists of EmpID and EmpName, as it seems, and there is no special delimiter in this data as well. For both of these types of data, we need to divide the cells into different columns.
Excel has a Text to Column tool, which helps us divide the cells into different columns.
Examples of Divide Cell in Excel
We will see how it works with two examples in this article.
Example #1 – Divide cells with Delimiter in Excel
See the data below. The same text file is opened with Excel, which we have seen through the above screenshots and has comma-separated values in it within a single row of the sheet.
To divide it into different columns per field value, we need to use the Text to Column utility in Excel.
Step 1: Select all the cells from column A (spread across the cells A1 to A12) containing data which is comma-separated.
Step 2: Navigate to the Data tab under the Excel ribbon, which is placed at the uppermost corner of the worksheet and click on it.
Step 3: As soon as you click on the Data tab, you’ll see different options associated with the data using which we can manipulate the data in Excel. However, you need to navigate to the Data Tools group, under which you’ll see Text to Column as an option.
As soon as you click on the Text to Column option, you’ll see Convert Text to Column Wizard popping up on your excel screen, as shown below:
By default, the Delimited option is checked for you. Since our data has a delimiter (comma), we will go with the same selection. Click on the Next > button.
Step 4: Under the Delimiters section, tick the select Comma option (since we have comma-separated data with us). You have different delimiter options such as Tab, Semicolon, Space, etc.; if your data has any delimiter apart from these standard ones, you can use other options to add it as a delimiter for the data to be divided. Since we have a comma with us, we will use the comma as a delimiter. Once you click on the comma, you can see the cell values are divided into separate columns after each comma under the Data preview section. Click on the Next button after done.
Once you click on the next option, you’ve several options that will allow you to either change the column data type for various columns the data gets split in. Ex. Whether you wanted to store any specific column as a Text or Date format or choose not to import that column with the option, do not import the column (skip) option. Well, these are the options; right now, we are not going to use to and just will use the standard Text to Column settings, in which the Column Data Format is set as General.
Step 5: Set the Column data format as General by clicking the General radio button. Under the Destination: section set the destination as cell A1 and click on the Finish option to complete the dividing data into cells procedure.
Once you click on the Finish option, you can see data divided across different columns, as shown in the screenshot below:
You can see the data which was in a single cell with a comma as a separator or delimiter is now populated across the different columns such as EmpID (column A), EmpName (column B), Location (column C) and Experience (column D).
This is one way to divide cells in Excel when you have delimited data.
Example #2 – Divide cells with Fixed Width in Excel
The Other example is something where you don’t have any delimiter but a data with fixed with and you need to divide the cells containing that data into different columns.
See the data below:
Step 1: Follow the first three steps from the previous example (Example 1) as it is to be able to open the Text to Column Wizard in Excel, which helps in dividing the cells.
Step 2: Now, as soon as the Convert Text to Columns Wizard gets opened, you need to click the Fixed Width radio button instead of the Delimited (which is set by default). Click on the Next button.
Step 3: After you click on the Next button, you can make the split after a specific length. For Example, we can make a split after the first three characters, which are part of EmpID. See the screenshot below. After you are happy with the split made, click on the Next button.
Step 4: On the next screen, you can set the data type as General, Date, etc. And set the Destination Range as well. Once done, you can click on the Finish button. See the screenshot below:
Once you click on the Finish button, you can see the data divided into two different columns, as shown below:
This is how we can divide cells in Excel into different columns using Text to Column wizard.
Things to Remember
- For dividing the cells, your data should have a common delimiter for all the fields. Otherwise, it is not possible to divide the data into different columns.
- If the data doesn’t have a delimiter, you can use the Fixed Width option as well. However, your data should have a fixed number of characters where a split can happen for that to happen. For Ex. after every third character, you may create a split (as shown in Example 2.)
Recommended Articles
This has been a guide to Divide Cell in Excel. Here we discuss How to use Divide Cell in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –
120+ Online Courses | 500+ Hours | Verifiable Certificates | Lifetime Access
4.9
View Course
Related Courses