To split text in Google Sheets by a line break, use the SPLIT function with the character CHAR(10) as the delimiter, like this: =SPLIT(A1, CHAR(10)). This separates the contents of a cell into multiple adjacent cells whenever a line break occurs. Alternatively, you can use the built-in Split text to columns menu, which lets you choose a custom separator and handles line breaks directly.
Why Line Breaks Are Tricky in Google Sheets
Line breaks inside a cell (created by pressing Ctrl+Enter on Windows/ChromeOS or Cmd+Enter on Mac) are stored as a special non-printing character. In Google Sheets, that character is the ASCII line feed, which has the code 10. When you copy text from a website, an email, or another spreadsheet, line breaks often come along invisibly. The default Split text to columns action only recognizes commas, semicolons, periods, and spaces—not line breaks. So if you try to split a cell that contains multiple lines using the standard menu, nothing happens. Understanding that the line break is a character with a numeric code is the key to solving this.
Method 1: Using the SPLIT Function (Fastest)
The SPLIT function is the most flexible way. It takes the text you want to split and a delimiter, then places each piece into separate cells horizontally.
- Assume cell A1 contains the text “Apple” followed by a line break, then “Banana”, then another line break, then “Cherry”.
- In cell B1, type:
=SPLIT(A1, CHAR(10)) - Press Enter. The result will show “Apple” in B1, “Banana” in C1, and “Cherry” in D1.
If you want the results to go vertically (down a column) instead of across a row, wrap it with TRANSPOSE: =TRANSPOSE(SPLIT(A1, CHAR(10))). This places each line in a separate row starting from the formula cell.
Method 2: Using Split Text to Columns (No Formula)
If you prefer a menu-driven approach, Google Sheets has a built-in tool that can handle line breaks, though it isn’t obvious at first.
- Select the cell or range containing the text with line breaks.
- Go to Data > Split text to columns.
- In the separator menu that appears at the bottom of the selected range, click the dropdown and choose Custom.
- In the custom separator box, press Ctrl+Enter (Windows) or Cmd+Enter (Mac) to insert an actual line break character. The box will look empty, but it contains the character.
- Press Enter or click outside. The text will split into columns.
This method overwrites the original data with the split results, so make sure you have a backup or are working on a copy. It also splits only horizontally, not into rows.
Method 3: Using Find and Replace to Convert Line Breaks
Sometimes you want to replace the line break with a different delimiter (like a comma) so you can then use the standard split feature. Here’s how:
- Select the range with line breaks.
- Press Ctrl+H (Windows/ChromeOS) or Cmd+Shift+H (Mac) to open Find and Replace.
- In the Find field, press Ctrl+Enter or Cmd+Enter to insert a line break character.
- In the Replace with field, type a comma or any other delimiter.
- Click Replace all. Now the line breaks become commas, and you can use Data > Split text to columns with the comma separator.
This method is useful when you need to clean data for import into other systems that don’t recognize line breaks.
Common Problems and How to Fix Them
- Problem: The SPLIT function returns an error like
#VALUE!. Fix: Make sure the cell actually contains a line break. Sometimes what looks like a line break is actually a space or a non-breaking space. Use=CODE(MID(A1,2,1))to check the character code at a specific position. - Problem: SPLIT leaves extra blank cells. Fix: Use the
SPLITfunction’s third argument to ignore empty text. For example:=SPLIT(A1, CHAR(10), TRUE)will skip consecutive delimiters. - Problem: You want to split into rows, not columns. Fix: Use
=TRANSPOSE(SPLIT(A1, CHAR(10)))as mentioned above. - Problem: The text has Windows line breaks (carriage return + line feed). Fix: Use
=SPLIT(SUBSTITUTE(A1, CHAR(13), ""), CHAR(10))to remove the carriage return character (CHAR(13)) first.
Comparing SPLIT Function vs. Split Text to Columns
The SPLIT function is dynamic—if the original cell changes, the split results update automatically. The menu-based Split text to columns is static; it writes the split values directly into cells and doesn’t update. Choose the function when you need live updates or when you want to keep the original data intact. Choose the menu when you want a one-time cleanup and don’t mind overwriting the original. Also, the menu only splits horizontally (into columns), while the function can be combined with TRANSPOSE to split vertically. For large datasets, the function can slow down your sheet if used on thousands of rows, so the menu may be more efficient for a one-off operation.
Alternatives: Using QUERY, REGEXEXTRACT, or Apps Script
If you need more complex splitting, you can use REGEXEXTRACT to pull out specific lines based on patterns. For example, to extract the first line from A1, use: =REGEXEXTRACT(A1, "(.*?)\n"). To extract the last line, use: =REGEXEXTRACT(A1, "\n(.*)"). For splitting into multiple rows across a range, you can use FLATTEN with SPLIT if you have multiple cells, like: =FLATTEN(SPLIT(A1:A3, CHAR(10)))—this will put all lines from A1, A2, and A3 into a single column. If you need to split and then perform calculations, consider using ARRAYFORMULA with SPLIT. For a permanent script, Google Apps Script can loop through cells and split them, but that’s overkill for most users. The built-in functions cover the vast majority of needs.
Frequently Asked Questions
Can I split by line break in Excel the same way?
No. Excel uses a different function. In Excel, you would use =TEXTSPLIT(A1, CHAR(10)) if you have Microsoft 365, or use the Text to Columns wizard and choose “Delimited”, then check “Other” and press Ctrl+J to enter a line break as the delimiter. Excel’s SPLIT function does not exist; it’s a Google Sheets function.
Why does my SPLIT function return a single cell with the whole text?
That usually means the delimiter you used doesn’t match the actual character in the cell. If the text was pasted from a Windows program, it might contain a carriage return (CHAR(13)) followed by a line feed (CHAR(10)). Your SPLIT only looks for CHAR(10), so it finds the line feed but the carriage return remains attached to the end of each piece, making it look like nothing split. Use =SPLIT(SUBSTITUTE(A1, CHAR(13), ""), CHAR(10)) to clean it.
How do I split into separate rows instead of columns?
Wrap the SPLIT function with TRANSPOSE. For example, =TRANSPOSE(SPLIT(A1, CHAR(10))) will put each line in a separate row. If you have multiple cells, use =FLATTEN(SPLIT(A1:A3, CHAR(10))) to combine all lines into one column.
Can I split a whole column of cells by line break at once?
Yes, use ARRAYFORMULA with SPLIT, but note that SPLIT expands horizontally, so you need to set up a range that can hold the maximum number of columns. For example, =ARRAYFORMULA(SPLIT(A1:A10, CHAR(10))) will split each cell in A1:A10 into columns. If you want rows, use =FLATTEN(SPLIT(A1:A10, CHAR(10))).
Is there a way to split by line break without using a formula?
Yes, use Data > Split text to columns and choose Custom as the separator, then press Ctrl+Enter (or Cmd+Enter on Mac) in the custom box to insert a line break. This is a one-time action and doesn’t require any formulas.