Google Sheets Formula: Separate by Comma
In this article
To separate comma-separated text into individual cells in Google Sheets, use Data > Split text to columns and choose Comma as the separator. For a formula-based approach, use =SPLIT(A1, ",") to spill values across columns, or =TEXTSPLIT(A1, ",") if your sheet supports it. Both methods work without add-ons and handle typical lists like "apples,bananas,cherries".
What You'll Need
- A Google account with access to Google Sheets (free).
- Your data in a single column, with commas between items (no spaces required, but spaces after commas are fine).
- An empty column or row to the right or below where the split results can appear.
Step-by-Step
- Open your sheet and locate the column containing comma-separated values. For example, cell A2 might contain
apples,bananas,cherries. - Select the range you want to split (e.g., A2:A10). Do not include header rows unless you want them split too.
- Use Split text to columns: go to Data > Split text to columns. A small separator box appears near the selected data.
- Choose Comma from the separator dropdown. If your data uses a different delimiter (semicolon, space, pipe), pick that instead. The preview updates immediately.
- Check the preview to confirm values land in separate columns. If a value contains a comma inside quotes (e.g.,
"Smith, John"), the simple split may break it; see Common Mistakes below. - Click outside the separator box or press Enter to apply. The data is now split across adjacent columns.
- Alternative formula method: in an empty cell to the right, enter
=SPLIT(A2, ","). Press Enter. The result spills into as many columns as there are items. - Fill down the formula if you have multiple rows: drag the fill handle or copy the formula down. Each row's values will spill to the right, so ensure enough empty columns exist.
- Trim spaces (optional): if your source has spaces after commas, wrap with ARRAYFORMULA and TRIM:
=ARRAYFORMULA(TRIM(SPLIT(A2, ","))). This removes leading/trailing spaces from each piece. - Convert results to values (optional): if you want to remove the formula and keep only the split text, select the spilled range, copy, then use Edit > Paste special > Values only.
Menu labels can differ slightly by version, device, or region. The steps above apply to the desktop web version; the mobile app has limited support for Split text to columns, so use the formula method there.
Common Mistakes
- Forgetting to select the full range before splitting. Split text to columns only affects the selected cells; if you select one cell, only that cell splits.
- Overwriting adjacent data. Splitting pushes values into the columns to the right. If those columns contain data, it will be overwritten. Insert empty columns first.
- Using the wrong delimiter. If your data uses semicolons or pipes, choosing Comma will not split correctly. Match the separator to your actual data.
- Ignoring quoted commas. A value like
"Doe, Jane"contains a comma inside quotes. Simple splitting will break it into two pieces. There is no built-in setting to respect quotes in Split text to columns; you may need to clean the data first or use a more complex formula with REGEX. - Expecting SPLIT to handle multiple rows automatically. SPLIT works on one cell at a time; you must copy the formula down or use ARRAYFORMULA with a range.
- Leaving formulas in place when you need static values. If you later sort or edit the source, spilled results change. Convert to values if you need a fixed snapshot.
Tips
- Use
=ARRAYFORMULA(SPLIT(A2:A10, ","))to split an entire column in one formula. The result spills into a block of cells; make sure the area to the right and below is empty. - To split into rows instead of columns, wrap with TRANSPOSE:
=TRANSPOSE(SPLIT(A2, ",")). This is useful when you want a vertical list. - If your data has inconsistent spacing, combine SPLIT with TRIM as shown above, or use
=ARRAYFORMULA(TRIM(SPLIT(A2, ","))). - For data that contains commas inside quotes, consider using Data > Split text to columns with the "Detect automatically" option, which sometimes handles quotes better, or clean the data in a text editor first.
- Test on a copy of your sheet before splitting large ranges, so you can undo without losing work.
- Use Ctrl+Z (Cmd+Z on Mac) immediately if the split overwrites data you need.
Troubleshooting
- Nothing happens when I choose Comma. Make sure you selected the cells containing the text, not an empty cell. Also confirm the data actually contains commas; if it uses another character, pick that separator.
- The split puts everything in one column. This usually means the delimiter does not match. Check for spaces around commas (e.g.,
apples , bananas) — the space becomes part of the value. Use TRIM or clean the source. - I get a #REF! error with SPLIT. The formula needs empty cells to spill into. Clear the cells to the right or move the formula to a location with enough space.
- Some rows split into more columns than others. That is normal; SPLIT spills as many columns as needed per row. The extra cells in shorter rows remain empty.
- The split removed my original data. Split text to columns replaces the original cells. If you need the original, undo immediately (Ctrl+Z) and work on a copy, or use the formula method which leaves the source intact.
- Quoted values break incorrectly. As noted, simple splitting does not respect quotes. If this is critical, pre-process the data or use a custom formula with REGEXEXTRACT and SPLIT, though that is advanced. For most lists without quoted commas, the standard methods work fine.
Frequently Asked Questions
Can I split by comma without a formula?
Yes. Select your data, go to Data > Split text to columns, and choose Comma as the separator. This is the fastest method for one-time splits.
Does SPLIT work in the Google Sheets mobile app?
The SPLIT function works in the mobile app, but the Split text to columns menu option is not available on mobile. Use the formula method instead.
How do I split a comma-separated list into rows instead of columns?
Wrap SPLIT with TRANSPOSE: =TRANSPOSE(SPLIT(A2, ",")). The results will spill downward instead of to the right.
What if my data has spaces after commas?
Use =ARRAYFORMULA(TRIM(SPLIT(A2, ","))) to remove extra spaces from each split value.
Can I split multiple rows at once with a formula?
Yes, use =ARRAYFORMULA(SPLIT(A2:A10, ",")). Ensure the cells to the right and below are empty to avoid #REF! errors.
Why does my split ignore some commas?
Commas inside quotation marks are treated as part of the value by some tools, but Google Sheets' simple split does not respect quotes. If you see incorrect splits, check for quoted commas and clean the data or use a more advanced formula.