How to expand comma-separated values into separate rows
Your CSV has cells with multiple comma-separated values (like tags, categories, or skills) but you need each value on its own row for proper analysis or import.
This guide uses the spreadsheet editor. Jev adds decision columns instead.
Open Magic CSVspreadsheet editor example
Prompt
"Expand each comma-separated tag into its own row"
Before
| # | product | tags | price |
|---|---|---|---|
| 1 | Widget Pro | electronics, gadgets, bestseller | $99.00 |
| 2 | Basic Tee | clothing, cotton | $24.99 |
| 3 | Power Bank | electronics, travel, accessories | $49.00 |
After
| # | product | tag | price |
|---|---|---|---|
| 1 | Widget Pro | electronics | $99.00 |
| 2 | Widget Pro | gadgets | $99.00 |
| 3 | Widget Pro | bestseller | $99.00 |
| 4 | Basic Tee | clothing | $24.99 |
| 5 | Basic Tee | cotton | $24.99 |
| 6 | Power Bank | electronics | $49.00 |
| 7 | Power Bank | travel | $49.00 |
| 8 | Power Bank | accessories | $49.00 |
Why use the spreadsheet editor for this?
- Turn one row with multiple values into multiple rows
- Preserve all other column data for each expanded row
- Perfect for normalizing data for databases
Related guides
- Expand Numbered Lists into Rows
Parse numbered lists (1., 2., 3.) into individual rows
- Expand Multi-Value Cells
Handle any separator: commas, semicolons, pipes, newlines
Continue in the spreadsheet editor.
Use the spreadsheet editor, AI columns, and cleanup tools within the same Magic CSV account.