Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Newline Char: How to Add Line Breaks in Cells

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To add a newline character in Excel, use the keyboard shortcut Alt + Enter (Windows) or Option + Command + Return (Mac) while typing inside a cell. This forces the text to wrap to a new line within a single cell rather than moving to the next row. If you are using a formula to combine text, use the CHAR(10) function for Windows or CHAR(13) for Mac, ensuring that Wrap Text is enabled in the Home tab.

What You'll Need

  • A computer with Microsoft Excel installed (Windows or macOS).
  • A keyboard with the Alt/Option keys.
  • The Wrap Text setting enabled (essential for the newline to be visible).

Step-by-Step

Depending on whether you are entering data manually or using a formula, the process for inserting a newline character differs. Follow the method that matches your current task.

Method 1: Manual Entry (Keyboard Shortcuts)

  1. Select the cell where you want to enter the text.
  2. Double-click the cell or select it and press F2 to enter Edit mode.
  3. Type the first line of your text.
  4. Press Alt + Enter (on Windows) or Option + Command + Return (on Mac). The cursor will drop down to a new line within the same cell.
  5. Type the next line of text.
  6. Repeat the shortcut for as many lines as necessary.
  7. Press Enter to finalize the entry.
  8. If the text does not appear on separate lines and instead looks like one long string, go to the Home tab on the ribbon and click the Wrap Text button in the Alignment group.

Method 2: Using Formulas (The CHAR Function)

When you need to combine data from multiple cells and insert a line break between them, you cannot use a keyboard shortcut. You must use a function to tell Excel to insert a newline character.

  1. Click on the cell where you want the combined result to appear.
  2. Start your formula with an equals sign (=).
  3. Reference the first cell or type text in quotes. For example: =A2.
  4. Use the ampersand (&) to concatenate (join) the next part of the formula.
  5. Insert the newline character function: & CHAR(10) & for Windows users. (Mac users may need CHAR(13)).
  6. Reference the second cell or add more text. For example: & B2.
  7. The full formula should look like this: =A2 & CHAR(10) & B2.
  8. Press Enter.
  9. Crucial Step: The result will likely appear as a single line with a space or a strange character. You must select the cell, go to the Home tab, and click Wrap Text. The line break will only render visually when Wrap Text is active.

Method 3: Find and Replace (Bulk Insertion)

If you have a large dataset where a specific character (like a comma or a semicolon) should actually be a newline, you can replace them all at once.

  1. Select the range of cells you want to modify.
  2. Press Ctrl + H to open the Find and Replace dialog box.
  3. In the Find what: box, type the character you want to replace (e.g., a comma).
  4. Click into the Replace with: box.
  5. Press Ctrl + J. You will not see any text appear in the box; however, you may see a tiny blinking dot or the cursor change. This is the hidden shortcut for a newline character in the Replace dialog.
  6. Click Replace All.
  7. Ensure Wrap Text is enabled for those cells to see the results.

Common Mistakes

The most frequent error users make is forgetting to enable Wrap Text. By default, Excel cells are set to a single line of text. Even if you successfully insert a newline character using Alt + Enter or CHAR(10), Excel will hide the break and display the text on one line unless the cell is explicitly told to wrap. If your text looks like it is cutting off or overlapping into the next cell, Wrap Text is the solution.

Another common mistake is using the wrong CHAR code. CHAR(10) is the standard Line Feed (LF) character used in Windows and most modern versions of Excel. Some users mistakenly try CHAR(13) (Carriage Return), which may work on older Mac versions but often fails to produce the desired visual break on Windows. If you are sharing a workbook between Mac and PC users, CHAR(10) is generally the safer, more universal choice.

Users also frequently try to press the Enter key alone to create a new line. In Excel, pressing Enter simply completes the data entry for that cell and moves the selection to the cell below. This is a fundamental difference between a spreadsheet and a word processor like Microsoft Word.

Tips

To make your multi-line cells look professional, adjust the Vertical Alignment. When a cell has multiple lines, the text often defaults to the bottom of the cell. Go to the Home tab, look at the Alignment group, and select Top Align or Middle Align. This prevents the text from appearing "sunken" if the row height is larger than the text block.

If you have a massive amount of data and need to insert line breaks based on a specific pattern, consider using the TEXTJOIN function (available in Excel 2019 and Office 365). Instead of chaining multiple ampersands, you can use =TEXTJOIN(CHAR(10), TRUE, A2, B2, C2). This tells Excel to put a newline character between every cell listed, and the TRUE argument tells it to ignore any empty cells so you don't end up with awkward blank lines in your data.

For those working with data that will be exported to a CSV file, be aware that newline characters can sometimes cause issues with third-party software. While Excel handles them fine, some database importers might see a newline as the end of a record. In these cases, it is better to use a unique delimiter (like a pipe symbol |) and only convert to newlines during the final formatting stage.

Troubleshooting

The text is still on one line after pressing Alt + Enter.
Check the Wrap Text button in the Home tab. If it is not highlighted, the newline character is there, but it is invisible. Click the button to activate the wrap.

The row height didn't automatically adjust.
Sometimes Excel doesn't automatically expand the row to show all lines of a wrapped cell. To fix this, hover your mouse over the boundary line between row headers on the left side of the screen. When the cursor turns into a double-sided arrow, double-click. This will AutoFit the row height to fit all the content, including your newlines.

The CHAR(10) formula is showing as text.
If you see =A2&CHAR(10)&B2 written out in the cell instead of the result, the cell is likely formatted as "Text." Change the cell format to "General" via the Home tab, then double-click the cell and press Enter to re-trigger the formula calculation.

Ctrl + J didn't work in Find and Replace.
Ensure your cursor is actively blinking inside the "Replace with" field before pressing Ctrl + J. If you are using a laptop, ensure the Fn key isn't interfering with your Ctrl shortcuts. If it still fails, try the manual Alt + Enter method for a few cells to ensure your version of Excel supports the character.

Frequently Asked Questions

Can I use a newline character in a Pivot Table?

Yes, but the source data must have the newline characters already inserted, and the Pivot Table cell must have Wrap Text enabled. You cannot typically insert a manual line break directly into a Pivot Table's calculated field without using the CHAR(10) method in the underlying data.

Does the newline character work in Excel Online?

Yes, the Alt + Enter shortcut works in the web version of Excel. However, depending on your browser and operating system, you may need to use Alt + Enter or Ctrl + Enter. Wrap Text must still be enabled for the break to be visible.

How do I remove all newline characters from a sheet?

Use the Find and Replace tool. Press Ctrl + H, press Ctrl + J in the "Find what" box, and leave the "Replace with" box completely empty. Click Replace All to strip all line breaks from your selected range.

Is there a difference between CHAR(10) and CHAR(13)?

CHAR(10) is a Line Feed (LF), and CHAR(13) is a Carriage Return (CR). Windows uses LF for newlines within cells. Older Mac systems used CR. In modern versions of Excel, CHAR(10) is the standard for creating a visual line break within a cell.

Can I use a newline character in a Data Validation dropdown?

No, Excel does not support newline characters within the dropdown list of a Data Validation menu. The list will always appear as a single line per entry, regardless of whether you use Alt + Enter in the source cells.