Excel Formula to Split and Transpose Comma-Separated Text into a Vertical List

📅 Apr 15, 2026 📝 Sarah Miller

Manually reorganizing comma-separated data from a single cell into a clean, vertical column is a tedious, error-prone chore for busy data professionals. While traditional workarounds like "Text-to-Columns" combined with manual transposing offer a static fix, they fail to adapt to live data. Dynamically automating this workflow with modern Excel formulas ensures your vertical layouts update instantly as source inputs change.

Stipulation: This advanced automation requires Excel 365 or Excel 2021 to support dynamic array engine capabilities.

By deploying the formula =TOCOL(TEXTSPLIT(A1, ",")), you can immediately transform delimited text into structured rows. Below, we outline the exact steps to implement this formula, handle erratic spacing, and clean up empty cells.

Excel Formula to Split and Transpose Comma-Separated Text into a Vertical List

Dealing with data trapped in a single cell as a comma-separated list is one of the most common data-cleaning challenges in Microsoft Excel. Whether you have exported a list of tags from a content management system, retrieved a list of email addresses, or downloaded a database report, working with horizontal, comma-delimited strings can severely limit your analysis. To run lookups, build pivot tables, or simply organize your data, you need that comma-separated text transposed into a clean, vertical list.

Depending on your version of Excel, there are several highly efficient ways to tackle this. In this guide, we will explore the best dynamic formulas for modern Excel (Microsoft 365 and Excel 2021), robust workarounds for older legacy Excel versions, and alternative non-formula methods like Power Query.


Method 1: The Modern Excel Way (Office 365 & Excel 2021)

If you are using Microsoft 365 or Excel 2021, you have access to a suite of dynamic array functions that make transposing text incredibly easy. The star of the show here is the TEXTSPLIT function, combined with either TRANSPOSE, TOCOL, or native parameter settings.

Approach A: Splitting Directly into Rows (The Smart Way)

Many users do not realize that the TEXTSPLIT function can split text directly into vertical rows without needing a secondary transpose function. The syntax for TEXTSPLIT is:

=TEXTSPLIT(text, [col_delimiter], [row_delimiter], [ignore_empty], [match_mode], [pad_with])

By skipping the second argument (col_delimiter) and specifying the comma as the third argument (row_delimiter), Excel will automatically output the split values vertically:

=TEXTSPLIT(A2, , ",")

Handling Spaces: Often, comma-separated lists contain spaces after the commas (e.g., "Apple, Banana, Cherry"). If you split solely by a comma, your resulting vertical list will contain unwanted leading spaces before "Banana" and "Cherry". To fix this, wrap the formula inside the TRIM function:

=TRIM(TEXTSPLIT(A2, , ","))

Approach B: Combining TEXTSPLIT with TRANSPOSE or TOCOL

If you prefer to split your columns horizontally first and then flip them, you can wrap a standard horizontal TEXTSPLIT inside the TRANSPOSE or TOCOL functions. Both formulas yield the exact same vertical array:

=TRANSPOSE(TRIM(TEXTSPLIT(A2, ",")))

Or, using the modern TOCOL (To Column) function:

=TOCOL(TRIM(TEXTSPLIT(A2, ",")))

These dynamic array formulas are completely interactive. If you edit the comma-separated string in cell A2, your vertical list will instantly update and adjust its length automatically.


Method 2: The Legacy Excel Way (Excel 2013 to 2019)

If you are working in an older version of Excel, you will not have access to TEXTSPLIT. However, you can still achieve a fully dynamic vertical split using a brilliant workaround that combines FILTERXML and SUBSTITUTE.

The FILTERXML Formula

The FILTERXML function is designed to parse XML data. By using the SUBSTITUTE function, we can trick Excel into converting our comma-separated text into an XML string, which FILTERXML can then easily output as a vertical array.

Enter the following formula in a cell and press Enter (or Ctrl + Shift + Enter if you are on an older, non-dynamic array version of Excel):

=FILTERXML("<t><s>" & SUBSTITUTE(A2, ",", "</s><s>") & "</s></t>", "//s")

How this formula works under the hood:

  1. SUBSTITUTE: The formula replaces every comma in your cell with closing and opening XML tags (</s><s>). For example, if your text is "Red,Blue", it becomes "Red</s><s>Blue".
  2. String Concatenation: The formula wraps the entire string with opening tags (<t><s>) and closing tags (</s></t>). This transforms your text into a well-formed XML structure: <t><s>Red</s><s>Blue</s></t>.
  3. FILTERXML: The "//s" argument tells the function to extract the content of every <s> node. Because XML nodes are naturally parsed as a vertical hierarchy, Excel displays the extracted items down a column.

Note: FILTERXML is case-sensitive and does not work in Excel for Mac or Excel on the Web.


Method 3: The Power Query Method (For Large Datasets & Automation)

When you need to transpose comma-separated text for thousands of rows, formulas can sometimes slow down your workbook. Power Query is Excel's built-in data transformation engine, and it is the absolute best tool for processing bulk lists into structured rows.

Step-by-Step Power Query Process:

  1. Select the table or range containing your comma-separated column.
  2. Go to the Data tab on the Ribbon and click From Table/Range. This opens the Power Query Editor.
  3. Right-click the header of the column containing your comma-separated values.
  4. Choose Split Column > By Delimiter from the context menu.
  5. In the Split Column dialog box:
    • Set the; Comma.
    • Expand the Advanced options section.
    • Under "Split into", select Rows (this is the crucial step!).
  6. Click OK. Power Query will parse the text and generate a new row for every single split value, preserving all corresponding data in neighboring columns.
  7. Go; the Home tab and click Close & Load; return your clean, vertical list back; a new Excel sheet.

Method 4: The Classic "Text to Columns" & Transpose Paste (Manual Method)

If you only need; perform this task once and do not require your output; be linked; the original cell via formulas, you can use Excel's manual wizardry.

  1. Select the cell containing your comma-separated list.
  2. Go to the Data tab and click Text to Columns.
  3. Choose Delimited and click Next.
  4. Check the Comma checkbox (and uncheck others), then click Finish. Your data is now split horizontally across multiple columns.
  5. Select and copy (Ctrl + C) the newly split horizontal cells.
  6. Right-click on the destination cell where you want your vertical list to start.
  7. Hover over Paste Special and select the Transpose (T) icon, or press Ctrl + Alt + V, check Transpose, and click OK.
  8. Delete the temporary horizontal cells to keep your sheet clean.

Comparison: Which Method Should You Use?

Method Excel Version Compatability Pros Cons
TEXTSPLIT & TRIM Microsoft 365 / Excel 2021+ Ultra-fast, fully dynamic, updates instantly, easiest to read. Not supported in legacy Excel versions (2019 and older).
FILTERXML Excel 2013 - 2019 Dynamic formula solution for older versions. Complex syntax, does not work on Excel for Mac/Web.
Power Query Excel 2010 (with add-in) - Present Excellent for large datasets, repeatable steps, cleans other data simultaneously. Requires manual refresh when source data changes.
Text to Columns + Transpose All Excel Versions Simple, no knowledge of formulas required. Entirely manual, does not update if source data changes.

Wrapping Up

Converting comma-separated text into a vertical list no longer requires complex VBA macros. If you are using Microsoft 365, utilizing the native row delimiter setting in =TEXTSPLIT(A2, , ",") (wrapped in TRIM) is by far your best and cleanest option. If you are constrained to an older corporate system, the FILTERXML formula or a quick trip through Power Query will get your data formatted exactly how you need it in no time.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.