How to split string by certain length in Excel?
For regular text string in a cell such as AAABBBCCCDDD, how can you split this string by certain length, such as split after every 3 characters? And the result should be split into four parts “AAA”, “BBB”, “CCC”, “DDD” and located in separated four cells. This article will show you two methods of splitting string by certain length in Excel.
The Text to Columns feature of Excel helps you split string by certain length. Please do as follows.
1. Select the cells with regular text string you need to split, then click Data > Text to Columns.
2. In the first Convert Text to Columns Wizard, select the Fixed width option, and then click the Next button. See screenshot:
3. In the second Convert Text to Columns Wizard, please click at the desired positions in the string to create break lines, and then click the Next button. See screenshots:
4. In the last Convert Text to Columns Wizard, select a cell for locating the split texts in the Destination box, and finally click the Finish button.
You can see the selected text strings are split by specified length and located into separated columns as below screenshot shown.
The Split Cells utility of Kutools for Excel can easily split selected text string by fixed width.
Before applying Kutools for Excel, please download and install it firstly.
1. Select the cells with text strings you need to split, and then click Kutools > Merge & Split > Split Cells.
2. In the Split Cells dialog box, select Split to Columns or Split to Rows option as you need in the Type section, and in the Specify a separator section, select the Specify width option, enter the fixed width into the textbox, and finally click the OK button. See screenshot:
3. In the next Split Cells dialog box, select a cell to place the split texts, and then click the OK button.
Then the selected text strings are split after every 3 characters into multiple columns as below screenshot shown.
- How to split multiline cell contents into separated rows/columns in Excel?
- How to split comma separated values into rows or columns in Excel?