Skip to main content

Split cell contents into multiple columns or rows based on carriage return

Author: Xiaoyang Last Modified: 2025-04-08

When working with Excel, you may encounter situations where multiple values are stored in a single cell, separated by line breaks or carriage returns. To effectively analyze and manipulate the data, it can be helpful to split the contents of these cells into multiple columns or rows. This guide will walk you through the process step-by-step.

Split cells into multiple columns based on carriage return

Split cells into multiple rows based on carriage return


Split cells into multiple columns based on carriage return

If you have a list of cell contents separated by carriage returns and want to split them into multiple columns based on line breaks, as shown in the screenshot below, this section will introduce three effective methods to achieve this.
split cells into multiple columns by line break

Using the Text to Columns Feature

Excel’s Text to Columns feature is ideal for splitting cells into multiple columns.

  1. Select the cells containing the data you want to split.
  2. Navigate to the "Data" tab and click "Text to Columns".
    find and click Text to Columns
  3. In the "Convert Text to Columns Wizard", select "Delimited" and click "Next".
    select Delimited in stpe 1
  4. In step 2, check "Other" option under "Delimiters", click the box next to the "Other" option, press "Ctrl "+ "J" keys, and then click "Next". see screenshot:
    set line break in step2
  5. In step3, specify a cell for locating the result, then click "Finish" button directly to finish the operations.
    specify a cell for locating the result in step3
  6. Now, All the cell contents have been split into multiple columns as following screenshot shown:
    cell contents are split into multiple columns

Using Kutools for Excel

Kutools for Excel offers an easy-to-use feature that quickly splits cell contents into multiple columns based on specific delimiters, such as commas or carriage returns. With its intuitive interface and simple operation, it makes data processing more efficient and seamless!

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...
  1. Select the data range that you want to split.
  2. Click "Kutools" > "Merge & Split" > "Split Cells", see screenshot:
    cell contents are split into multiple columns
  3. In the "Split Cells" dialog box, select the "Split to Columns" option under the "Type" section that you need, and then check "New line Symbol" under the "Specify by" section, see screenshot:
    cell contents are split into multiple columns
  4. Then click "OK" button, and a prompt box will pop out to remind you select a cell to output the result, see screenshot:
    cell contents are split into multiple columns
  5. Click "OK", all the selected cell values have been split into multiple columns by the carriage return, see screenshot:
    cell contents are split into multiple columns

Using TEXTSPLIT function (Excel 365)

For Excel 365 users, the TEXTSPLIT function provides a dynamic way to split cells.

Enter the below formula into a blank cell to output the result, press "Enter" to split the text into columns automatically. And then, drag the formula cell down to fill other cells, see screenshot:

=TEXTSPLIT(A1, CHAR(10))

split cells into multiple columns by TEXTSPLIT function


Split cells into multiple rows based on carriage return

If you need to split cell contents containing multiple lines of text separated by carriage returns into individual rows as following screenshot shown. Excel provides several efficient methods to accomplish this. In this section, we will explore these techniques step by step to help you choose the best solution for your needs.
 split cells into multiple rows


Using the VBA code

For users comfortable with macros, VBA provides a powerful solution.

  1. Hold down the "ALT" + "F11" keys, and it opens the "Microsoft Visual Basic for Applications" window.
  2. Click "Insert" > "Module", and paste the following code in the "Module" Window.
    VBA code: Split cells into multiple rows based on carriage returns
    Sub SplitCells()
    'Update by Extendoffice
    Dim Rng As Range
    Dim WorkRng As Range
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
    For Each Rng In WorkRng
        lLFs = VBA.Len(Rng) - VBA.Len(VBA.Replace(Rng, vbLf, ""))
        If lLFs > 0 Then
            Rng.Offset(1, 0).Resize(lLFs).Insert shift:=xlShiftDown
            Rng.Resize(lLFs + 1).Value = Application.WorksheetFunction.Transpose(VBA.Split(Rng, vbLf))
        End If
    Next
    End Sub
    
  3. Then press "F5" key to run this code, and a prompt box will pop out to remind you select the data range that you want to split, see screenshot:
    vba code to select the data range
  4. Then click "OK", and your selected data has been split into multiple rows based on the carriage returns.
    cell contents are split into multiple rows

Using Kutools for Excel

Kutools for Excel provides a simple and efficient way to complete the splitting process in just a few steps. Here are the detailed steps:

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...
  1. Select the data range that you want to split.
  2. Click "Kutools" > "Merge & Split" > "Split Data to Rows", see screenshot:
    click Split Data to Rows feature of kutools
  3. In the "Split Dta to Rows" dialog box, select "New line" under the "Delimiter" section.
    specify options in the dialog box
  4. Then, click "OK" button. All the cells are split into multiple rows based on the carriage returns.
    cell contents are split into multiple rows by kutools

Using TEXTSPLIT function (Excel 365)

The TEXTSPLIT function can also split cells into rows dynamically.

Enter the below formula into a blank cell to output the result, press "Enter" to split the text into rows automatically. see screenshot:

=TRIM(TEXTSPLIT(TEXTJOIN(CHAR(10),,A1:A4),,CHAR(10)))

split cells into multiple rows by TEXTSPLIT function

Explanation of this formula:
  • TEXTJOIN(CHAR(10),,A1:A4)
    Combines all the values in the range A1:A4 into a single text string, separated by line breaks (CHAR(10)), while ignoring empty cells.
  • TEXTSPLIT(...,,CHAR(10))
    Splits the combined text string into individual values wherever a line break (CHAR(10)) occurs, returning an array of these values.
  • TRIM(...)
    Removes any extra spaces from the start or end of each value in the resulting array.

Each method has its advantages depending on your version of Excel and familiarity. By choosing the right approach, you can easily manipulate your data to meet your requirements. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials, Thank you for reading, and we look forward to providing you with more helpful information in the future!


Related Articles:

  • Split a large table into multiple small tables
  • If you have a large Excel table with multiple columns and hundreds or thousands of rows, you may want to split it into smaller, more manageable tables. For instance, you might need to separate the data based on specific column values or divide it into chunks of a fixed number of rows. This tutorial provides step-by-step methods to accomplish this task efficiently.
  • Split a column every other row
  • For example, I have a long list of data, and now, I want to split the column into two lists equally by every other row as following screenshot shown. Are there any good ways to deal with this task in Excel?
  • Split full name to first and last name
  • Supposing you have a name roster as the first screen shot shows in single column below, and you need to split the full name to the first name column, middle name column and last name column as the following screenshot shown. Here are some tricky methods to help you solve this problem.
  • Separate text and numbers from one cell into two columns
  • If you have a column of text strings which are composed of text and numbers, now, you would like to separate the text and numbers from one cell into two different cells as following screenshot shown. In Excel, you can finish this task with these methods.