Skip to main content

How to split data by delimiter and rearrange it into a column in Excel?

Author Sun Last modified
split data by delimiter and rearrange it into a column

When working with Excel, it's common to encounter cells that contain multiple values separated by commas, semicolons, or other delimiters. If you need to split a range of such cells by a specific delimiter and consolidate all the resulting values into a single column as below screenshot shown, there are efficient methods to achieve this for better data organization and analysis.

Split data by delimiter and rearrange it into a column


Split data by delimiter and rearrange it into a column with a formula (Excel 365)

In Excel 365, we can achieve this transformation dynamically using modern functions like TEXTSPLIT and TEXTJOIN functions.

Click on the cell where you want to put the result, enter the below formula, and press Enter key. The cells containing the comma separated text strings are converted to a list at once. See screenshot:

=TRANSPOSE(TEXTSPLIT(TEXTJOIN(", ", TRUE, A2:A5), ", "))
split data by delimiter and rearrange it into a column with formula

 

Explanation of this formula:
  • TEXTJOIN(",", TRUE, A2:A5): Combines all values in A2:A5 into a single text string, separated by commas.
  • TEXTSPLIT(..., ","): Splits the joined text into separate values wherever there is a comma.
  • TRANSPOSE(...): Turns the resulting row of values into a vertical column.

Split data by delimiter and rearrange it into a column with Kutools for Excel

For users working with legacy Excel versions (2016/2019 etc. lacking TEXTSPLIT function), Kutools for Excel's Split Data to Rows feature offers an ideal solution. This feature allows you to quickly split cell contents into a single column based on a specific delimiter, saving you time and effort.

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...

After installing Kutools for Excel, please do with the following steps:

  1. Click Kutools > Merge & Split > Split Data to Rows, see screenshot:
    click Split Data to Rows feature of kutools
  2. In the Split Data to Rows dialog box, specify the following operations:
    • Select the cells that you want to split;
    • In the Delimiter section, choose Other, then type your delimiter (e.g., a comma and a space) to define how the cell content should be split;
    • Finally, click OK button.
      specify the options in the dialog box

Result: The selected cells are split into a column by the specified delimiters.
split data by delimiter and rearrange it into a column with kutools

📝 Note: This method splits the data directly in the source area, so it is advisable to copy and back up the original data before using it.

Split data by delimiter and rearrange it into a column with VBA code

Here, we’ll walk you through how to use VBA to split cell contents by a delimiter and rearrange the results into one column.

1. Press Alt + F11 keys to display Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below code to the new Module window.

VBA: Split and Transpose

Sub Vertical()
'Updateby Extendoffice
    Dim i As Long, strTxt As String
    Dim startP As Range
    Dim xRg As Range, yRg As Range
    On Error Resume Next
    Set xRg = Application.InputBox _
    (Prompt:="Range Selection...", _
    Title:="Kutools For Excel", Type:=8)
    i = 1
    Application.ScreenUpdating = False
    For Each yRg In xRg
        If i = 1 Then
            strTxt = yRg.Text
            i = 2
        Else
            strTxt = strTxt & "," & yRg.Text
        End If
    Next
    Application.ScreenUpdating = True
    Set startP = Application.InputBox _
    (Prompt:="paste range...", _
    Title:="Kutools For Excel", Type:=8)
    ary = Split(strTxt, ",")
    i = 1
    Application.ScreenUpdating = False
    For Each a In ary
        startP(i, 1).Value = a
        i = i + 1
    Next a
    Application.ScreenUpdating = True
End Sub

3. Press F5 key to run the code, a dialog pops out for you to select a range to split and transpose.
vba code to select the data list

4. Click OK. A dialog pops out to select a location to place the data.
vba code to select a cell to lit the result

5. Click OK, and the selection has been split and transposed by comma.
split data by delimiter and rearrange it into a column by vba code

Note: In the code, the comma in the strTxt & "," and ary = Split(strTxt, ",") are the delimiter you will split data based on, you can change them as you need.

🔚 Conclusion

All methods effectively solve the core problem of splitting delimited data, with the optimal choice depending on your technical comfort level and specific requirements.

  • For most Excel 365 users, the formula approach offers the best balance of power and maintainability.
  • For frequent, complex transformations by non-programmers, Kutools is ideal.
  • For customized, automated solutions in enterprise environments, VBA provides the most control.

Choose the method based on your specific needs. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials to help you master Excel.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!