If a cell contains some text separated by comma or any other mark, and you want to split them into multiple columns, you should follow this guide. This article will help you split comma-separated text in Excel and Google Sheets without using any third-party software.
Let’s assume that you have a spreadsheet containing the full name of some people, and you want to split the first name and last name into two columns. Instead of names, it can include anything like product list, your services, and price, or anything else. If the number of rows is small, you can do it manually. The problem occurs when you need to do the same with hundreds of columns in either Microsoft Excel or Google Sheets. To get rid of that time-consuming work, you can check out this step by step guide.
How to Split Text to Columns in Excel
To split comma-separated text in Excel, follow these steps-
- Open the spreadsheet and select all cells.
- Go to the Data tab.
- Click on the Text to Columns option.
- Use the Delimited option and select a delimiter.
- Select a cell where you want to display the result.
- Save your file.
To get started, you need to open the spreadsheet in Microsoft Excel and select all the cells that contain command separated texts. After that, go to the Data tab and click on Text to Columns option.
You will get two options – Delimited and Fixed Width. You need to choose the Delimited option and click the Next button.
After that, select a Delimiter. As your spreadsheet has a comma, you need to select it from the list. However, it is possible to choose something else like Tab, Semicolon, Space, or anything custom. At last, click on the Next button.
Now you need to choose a cell to be the first column.
Coming back to the guide, you need to remove default Destination value, and select a cell where you want to display the output. At last, click the Finish button.
Whatever cell or column you choose, the very next one will have the last part of the comma-separated text.
For instance, if-
- You have a text like this – AA, BB
- Select B1 for AA
The BB part will be saved in the C1 cell. If your source text contains two commas, the very last part will be displayed in the D1 cell.
Now, you can find the result immediately.
How to split comma separated text in Google Sheets
In this case, Google Sheets is not as smart as Microsoft Excel. Although you can split all comma-separated texts, you cannot retain the source column. If you are okay with that, you should walk through these steps.
- Select all cells in your spreadsheet.
- Go to Data > Split texts to columns.
- Change separator if you want.
At first, you need to select all the cells that contain comma-separated values. After that, expand the Data menu and select Split text to columns option.
By default, it detects the separator or delimiter automatically. If you are using something unique or it doesn’t do the job flawlessly, you can expand the Separator drop-down list, and choose something else according to your requirement.
- Tags: Excel