Excel Practice Test

โ–ถ

Most people discover Alt+Enter by accident โ€” they press it once, the cursor drops to a new line inside the cell, and suddenly a whole category of formatting problems disappears. That's the Windows shortcut for inserting a line break in an Excel cell, and it's one of the most genuinely useful things you can learn in a spreadsheet program. Once you know it, you'll use it constantly. It's that kind of shortcut โ€” deceptively simple, broadly applicable.

Why does it matter? Think about the kinds of data that naturally span multiple lines. A mailing address โ€” street on one line, city and state on the next. A product label that needs two or three description rows. A task cell in a project tracker that holds a title on line one and a brief note on line two. A cell acting as a mini checklist.

A comment field where you want to separate paragraphs visually without splitting into multiple cells. Without the newline in Excel cell shortcut, you're stuck cramming everything onto one line (ugly and hard to scan) or splitting content across multiple rows โ€” which destroys table structure and makes sorting, filtering, and formula references a mess.

There's a catch โ€” and it trips up beginners every single time. The line break only shows if Wrap Text is enabled on that cell. Press Alt+Enter with Wrap Text off and nothing looks different. The cell still appears as a single line. Enable Wrap Text afterward and the layout snaps into place immediately. This is a formatting setting, not a character visibility problem โ€” the line break is stored in the cell, it just renders as a single compressed line until Wrap Text is active.

Beyond the manual shortcut, you can insert a line break programmatically using CHAR(10) in formulas โ€” which is what makes dynamic multi-line cells possible. Concatenate two field references with &CHAR(10)& between them and you've got a formula-driven address block or label that updates automatically whenever the source data changes. This is the formula equivalent of pressing Alt+Enter, and it's far more powerful for large datasets.

There's also the Mac side of things. On macOS, Alt+Enter doesn't work โ€” it triggers a different system function. The Excel for Mac shortcut is Ctrl+Option+Return. It does the exact same thing: inserts a CHAR(10) line feed at the cursor position. Same result, different key combo. We'll cover both in detail below.

This guide walks through every scenario: the Windows and Mac shortcuts, CHAR(10) in formulas, TEXTJOIN with newlines, finding and replacing line breaks, removing them with SUBSTITUTE, counting breaks for validation, and what happens when cells with line breaks end up in CSV exports. If you work with Excel regularly, you'll want all of these in your toolkit โ€” along with the rest of the excel shortcuts that save real time every day. Whether you're building a data model or just tidying up a report, line breaks inside cells are a surprisingly powerful formatting tool.

One thing this guide won't do is overcomplicate it. Line breaks in Excel are not complicated โ€” there are maybe six things to know, and you can learn all of them in ten minutes. Let's go through them properly.

Quick Reference: Line Breaks in Excel

Windows: Alt+Enter  |  Mac: Ctrl+Option+Return  |  In formula: CHAR(10)  |  Required: Wrap Text must be ON to see the line break

Four Ways to Add a New Line in Excel

๐Ÿ”ด Alt+Enter Shortcut (Windows)

Insert a line break inside the current cell while in edit mode. Press Alt+Enter at any cursor position โ€” text after the cursor moves to a new line within the same cell.

  • Shortcut: Alt+Enter
  • Works in version: Excel 2007, 2010, 2013, 2016, 2019, 2021, Microsoft 365
  • Note: Wrap Text must be enabled to see all lines
๐ŸŸ  Mac Shortcut

On a Mac, the line break shortcut is different because Alt+Enter triggers other system behavior. Use Ctrl+Option+Return (or Ctrl+Option+Enter) to insert a newline in Excel for Mac.

  • Shortcut: Ctrl+Option+Return
  • Works in version: Excel for Mac 2016, 2019, 2021, Microsoft 365 for Mac
  • Note: Some older Mac versions use Control+Option+Enter
๐ŸŸก CHAR(10) in Formulas

Insert a line break inside a formula result using CHAR(10) โ€” the line feed character. Combine it with & concatenation or TEXTJOIN to build multi-line cells dynamically.

  • Shortcut: =A1&CHAR(10)&B1
  • Works in version: All modern Excel versions
  • Note: Wrap Text required; cell updates when source data changes
๐ŸŸข Remove Line Breaks

Strip out all line breaks from a cell using the SUBSTITUTE function. Replace CHAR(10) with an empty string or a space, depending on whether you want the text to merge or keep a separator.

  • Shortcut: =SUBSTITUTE(A1,CHAR(10)," ")
  • Works in version: All modern Excel versions
  • Note: Use CLEAN() as an alternative for all non-printable characters

Alt+Enter: How the Windows Shortcut Actually Works

When you double-click a cell (or press F2) to enter edit mode, the cursor blinks inside the cell's text. Move it wherever you want the break โ€” after a comma, after the first line of an address, between two sentences โ€” then press Alt+Enter. Excel inserts a line feed character (CHAR(10)) at that exact position. Everything after the cursor drops to a new line inside the same cell. You haven't left the cell โ€” you're still in edit mode, on the next line.

Here's the thing that confuses people: if Wrap Text is off, the cell looks completely unchanged after you press Alt+Enter. The break is stored โ€” it's there in the cell value โ€” but Excel renders it as a single horizontal line because Wrap Text isn't active. Enable Wrap Text (Home tab โ†’ Alignment group โ†’ Wrap Text button, or keyboard shortcut Alt+H+W) and the multi-line layout appears immediately.

You can enable Wrap Text before you start typing, or after. Either works. Once it's active, row height auto-adjusts to show all lines โ€” though sometimes you'll need to double-click the row border in the row header to trigger auto-fit if it looks off. Excel isn't always perfect at recalculating row height on the fly, especially after you've added several breaks.

A few practical notes worth knowing as you start using this shortcut:

Wrap Text shortcut: Press Alt+H+W on Windows to toggle Wrap Text without touching the ribbon. To auto-fit row height after adding line breaks, double-click the row border in the row header โ€” this is faster than dragging or using the Format menu.

Row height management is a closely related skill. After adding line breaks, rows may need manual adjustment. Double-click the row number border to auto-fit the height based on the tallest cell. Or drag it to a fixed height if you want uniform row sizes. Right-click the row header and choose Row Height to enter a precise number. If you have multiple rows that all need the same height after adding content, select them all first, then right-click and set the height once โ€” it applies to all selected rows simultaneously.

Knowing how to indent in excel for cell content pairs naturally with line breaks. You can indent the second or third line of a multi-line cell by padding it with spaces, which creates a clean visual hierarchy inside the cell โ€” useful for structured notes, sub-items in a task list, or indented address components. It's a low-tech approach but surprisingly effective for tables that don't need full-blown formatting.

One thing worth clarifying: don't confuse a line break with a paragraph. Excel has no concept of paragraphs. Alt+Enter inserts a single line break character โ€” there's no paragraph spacing, no block-level margin, no heading style. Just a newline. If you're pasting from Word or a website that uses real paragraphs with spacing between them, those paragraph breaks usually convert into double line breaks or may cause inconsistent formatting. It's often cleaner to paste the text first and then manually re-add breaks where you want them inside the cell.

The excel carriage return in cell question comes up a lot โ€” and the answer is that Alt+Enter inserts a line feed (CHAR(10)), not a carriage return (CHAR(13)). On modern Windows Excel, line feed alone is the correct and expected character. Carriage return alone (CHAR 13) may cause display issues and is best avoided when inserting breaks manually or via formula. Stick with CHAR(10) and you'll have no compatibility issues.

Line Break Methods by Platform

๐Ÿ“‹ Windows (Alt+Enter)

Shortcut: Alt+Enter

Steps:

  1. Double-click the cell to enter edit mode (or press F2)
  2. Position the cursor where you want the line break
  3. Press Alt+Enter โ€” the cursor drops to a new line inside the cell
  4. Type the second line of text
  5. Press Enter when done
  6. Enable Wrap Text (Home โ†’ Alignment โ†’ Wrap Text) to display all lines

Example output: 123 Main Street / Chicago, IL 60601 (two lines in one cell)

๐Ÿ“‹ Mac (Ctrl+Option+Return)

Shortcut: Ctrl+Option+Return

Steps:

  1. Double-click the cell to enter edit mode (or press Ctrl+U on Mac)
  2. Position the cursor where you want the line break
  3. Press Ctrl+Option+Return โ€” hold all three keys, then press Return
  4. Type the second line of text
  5. Press Return when done
  6. Enable Wrap Text to display all lines (Format โ†’ Cells โ†’ Alignment, or toolbar button)

Example output: Product Name / SKU: ABC-1234 / In Stock (three lines in one cell)

๐Ÿ“‹ CHAR(10) Formula

Function: CHAR(10)

Steps:

  1. In the formula bar, build your concatenation: =A1&CHAR(10)&B1
  2. Press Enter to confirm the formula
  3. Enable Wrap Text on the cell to see the line break
  4. For multiple lines: =A1&CHAR(10)&B1&CHAR(10)&C1
  5. For joining a range: =TEXTJOIN(CHAR(10),TRUE,A1:A5)

Example: =A2&CHAR(10)&B2&CHAR(10)&C2 builds a 3-line label from three separate cells, updating automatically when source data changes.

Using CHAR(10) in Formulas for Dynamic Line Breaks

Manual line breaks (Alt+Enter) are static โ€” they're embedded in the cell value and stay put unless you go back and edit the cell. For data that comes from other cells or changes over time, CHAR(10) in a formula is the smarter approach. It gives you formula-driven multi-line output that updates automatically.

CHAR(10) returns the line feed character โ€” ASCII character 10 โ€” which is the same character that Alt+Enter inserts. Drop it into a concatenation and you get a formula-driven result. The basic pattern: =A1&CHAR(10)&B1. This takes the value from A1, adds a line break, then adds B1. If A1 has a first name and B1 has a job title, the result is a clean two-line display. Update A1 and the result updates immediately. Wrap Text on the formula cell is still required.

For three or more lines, chain them: =A1&CHAR(10)&B1&CHAR(10)&C1. This is how you build address blocks from separate database columns โ€” street address, city, postal code, country, each in their own field, merged into one formatted multi-line cell with a formula. When the source data changes, the address cell updates automatically with no manual editing needed.

TEXTJOIN with line breaks is even more powerful for variable-length ranges. The syntax is =TEXTJOIN(CHAR(10),TRUE,A1:A5) โ€” join the range A1:A5 using a line break as the delimiter, skipping empty cells (the TRUE argument handles that). This is ideal when you have a list of items in a column and want to display them all in a single cell without writing a long chain of &CHAR(10)&. It's especially useful in summary dashboards where you need to condense a list into one cell for display purposes.

There's a subtlety worth noting: on older Windows Excel versions, you might encounter cells that use CHAR(13) (carriage return) + CHAR(10) (line feed) together โ€” this is the classic Windows line ending convention. Modern Excel on Windows uses just CHAR(10) internally. On Mac, Excel now also stores CHAR(10) even though macOS traditionally used CHAR(13) alone. For compatibility and consistency, always use CHAR(10) in formulas and avoid CHAR(13) unless you're explicitly handling legacy files.

Conditional line breaks are also possible. Use an IF to decide whether to include a break: =A1&IF(B1<>"",CHAR(10)&B1,"") โ€” this adds a second line only if B1 has a value. Empty second lines look messy in multi-line cells, so conditional breaks are useful for optional fields like a second address line or a middle name.

If you're building reports that pull from multiple tables, knowing functions like countifs excel helps you aggregate data before concatenating it. A common dashboard pattern is: use COUNTIFS to generate summary counts in helper cells, then TEXTJOIN or concatenation with CHAR(10) to build a compact multi-line summary in a single display cell. This keeps the visual presentation tidy without sacrificing the underlying formula logic.

One practical gotcha: CHAR(10) in a formula result doesn't automatically enable Wrap Text on the result cell. You have to set that separately โ€” either manually or via a macro. If you're building a workbook for other users, make sure Wrap Text is already set on all cells that will contain line-break formulas. If it's not, users see garbled single-line output and assume the formula is broken when it's actually a formatting issue. A quick way to catch this before distributing a file: filter for cells containing CHAR(10) in their value and check their Wrap Text status.

The next line on excel cell question in formula context almost always means CHAR(10) โ€” that's the answer whether you're using basic concatenation, TEXTJOIN, or building more complex dynamic text with IF/IFS logic. Master CHAR(10) and you'll handle all of them the same way.

Line Break Checklist

Wrap Text is enabled on any cell containing line breaks โ€” without it, breaks don't show
Row height is sufficient to display all lines โ€” double-click the row border to auto-fit if needed
CHAR(10) used in formulas (not CHAR(13)) for cross-platform compatibility
CSV export behavior tested if the file will be opened in other programs โ€” cells with line breaks export with quotes
SUBSTITUTE used to remove line breaks before passing cell values to functions that don't handle them
TEXTJOIN with CHAR(10) used instead of manual chaining when joining variable-length ranges
Find & Replace with Ctrl+J in the Find field to locate and bulk-replace line breaks

Finding, Replacing, and Removing Line Breaks

Once a dataset has line breaks inside cells โ€” whether from imports, user entry, paste operations, or formula results โ€” you sometimes need to find and remove them in bulk. Excel has several clean approaches depending on whether you want a one-time cleanup or a reusable formula.

Find and Replace is the quickest manual method. Press Ctrl+H to open the dialog. Click in the Find What field and press Ctrl+J โ€” this inserts the line break character (CHAR(10)) as the search term. You won't see anything visible in the box, but it's there.

In the Replace With field, either type a space (to separate the formerly-broken lines with a space) or leave it empty (to merge the lines with no separator). Click Replace All and Excel processes every matching cell in the selection or sheet. This is the fastest approach for a one-time cleanup โ€” no formulas needed.

For a non-destructive formula approach, SUBSTITUTE is your tool. The syntax: =SUBSTITUTE(A1,CHAR(10)," ") replaces every line break in A1 with a single space. The original cell stays unchanged โ€” the cleaned result lives in a new column. Once you've confirmed the output looks right, you can copy the formula column, paste-as-values back to the original column, and delete the formula helper.

Use "" as the replacement if you want the text to merge completely with no separator: =SUBSTITUTE(A1,CHAR(10),""). This is useful when the line breaks were purely presentational and you need plain concatenated text for a downstream process or export.

The CLEAN function is a broader tool: =CLEAN(A1) strips all non-printable characters, which includes line breaks but also any other control characters that might have crept in from an external data source. It's blunter than SUBSTITUTE โ€” you can't control what gets removed โ€” but for messy imported data it's often the cleanest one-step solution.

Counting line breaks is useful for data validation and quality checks. The formula: =LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),"")). This counts total character length, then subtracts the length after removing all line breaks โ€” the difference equals the number of breaks. If a cell is supposed to contain exactly three lines (two breaks), this formula returns 2. You can use it in a conditional format rule to flag cells with unexpected break counts.

CSV export behavior is worth testing before sharing files. When Excel exports to CSV, any cell containing a line break gets wrapped in double-quotes in the output file โ€” this is standard CSV quoting behavior. Most programs parse this correctly, but some older or simpler parsers may misread quoted multi-line cells. If a downstream tool chokes on the export, use SUBSTITUTE to strip line breaks in a copy of the sheet before exporting.

Excel line break in cell keyboard shortcut for deletion: the fastest way to remove a single break manually is to position the cursor just before or after it in edit mode and press Delete or Backspace โ€” same as deleting any other character. For bulk cleanup, Ctrl+J in Find & Replace is much faster than hunting through cells manually. Knowing the keyboard shortcut to delete row in excel is a related productivity skill that speeds up row-level cleanup once cell-level content is cleaned up.

If you work heavily with data manipulation and want to go further, exploring advanced excel skills opens up a broader set of text-handling techniques โ€” TRIM, CLEAN, text-to-columns, Flash Fill, Power Query's split-by-delimiter tool โ€” that pair well with the line break techniques covered in this guide. Complex text cleanup jobs often require combining several of these tools in sequence.

Column width is a related layout concern. A very narrow column with multiple line breaks produces a cell that looks cluttered even with Wrap Text on. Widening the column often reduces the apparent need for breaks and makes the content easier to read. Use how to change column width in excel for the full set of options including AutoFit. Sometimes the right answer isn't more line breaks โ€” it's a wider column and fewer of them.

One final scenario worth planning for: if you're exporting data to a system that doesn't support multi-line cell values (some older ERPs, certain APIs, legacy databases), run a SUBSTITUTE cleanup pass before the export. Building that cleanup step into your export workflow โ€” rather than remembering it each time โ€” saves the kind of data errors that only show up after import and are annoying to debug.

Step-by-Step: Adding a Line Break in Excel

1

1

Select the cell where you want multi-line content. If the cell already has text, double-click to enter edit mode.

2

2

Use arrow keys or click inside the formula bar to place the cursor exactly where you want the line break inserted.

3

3

A new line opens inside the cell. The cursor is now on the second line, still within the same cell.

4

4

Enter the text for the second line. Repeat Alt+Enter if you need additional lines.

5

5

Press Enter (not Alt+Enter) to finish editing the cell and move to the next row.

6

6

Go to Home โ†’ Alignment โ†’ Wrap Text (or press Alt+H+W). The line breaks now display correctly.

7

7

If the row looks cramped, double-click the row border in the row header to auto-fit height. All lines should now be visible.

Line Break Quick Facts

CHAR(10)
Alt+Enter value
Ctrl+Option+Return
Mac shortcut
CHAR(13)
Carriage return
Yes
Wrap Text required
CHAR(10)
TEXTJOIN delimiter
Test Your Excel Knowledge

Excel Questions and Answers

How do I add a new line in an Excel cell?

Press Alt+Enter (Windows) while in cell edit mode โ€” position the cursor where you want the break, then press Alt+Enter. On Mac, use Ctrl+Option+Return. After inserting the break, enable Wrap Text (Home โ†’ Alignment โ†’ Wrap Text) so the extra lines are visible.

What is the shortcut for a new line in Excel?

On Windows, the shortcut is Alt+Enter. On Mac, it's Ctrl+Option+Return (hold Ctrl, Option, and Return together). Both insert a line break character (CHAR(10)) at the cursor position inside the cell.

How do I add a new line in Excel on Mac?

On a Mac, press Ctrl+Option+Return while in cell edit mode. Some older Mac versions use Control+Option+Enter. Make sure Wrap Text is enabled on the cell โ€” without it, the line break won't be visible even though it's stored in the cell value.

How do I add a line break in an Excel formula?

Use CHAR(10) in your formula. For example: =A1&CHAR(10)&B1 combines A1, a line break, and B1 into one cell. Enable Wrap Text on the result cell. For joining a range, use =TEXTJOIN(CHAR(10),TRUE,A1:A5).

How do I remove line breaks in Excel?

Use the SUBSTITUTE formula: =SUBSTITUTE(A1,CHAR(10)," ") to replace each line break with a space. Or use Find & Replace (Ctrl+H) โ€” in the Find field press Ctrl+J to enter the line break character, then leave Replace empty and click Replace All. The CLEAN function also removes all non-printable characters including line breaks.

Why isn't my line break showing in Excel?

The line break is almost certainly there โ€” it's just not displaying. The most common fix: enable Wrap Text on that cell (Home tab โ†’ Alignment group โ†’ Wrap Text). Without Wrap Text, Excel shows the cell content as a single line regardless of embedded line breaks. Also check that the row height is tall enough to show all lines.

What is CHAR(10) in Excel?

CHAR(10) returns the line feed character โ€” ASCII character 10 โ€” which is the same character that Alt+Enter inserts. You can use it in formulas to add line breaks dynamically: =A1&CHAR(10)&B1. On Windows, CHAR(13) is a carriage return โ€” avoid it in Excel and use CHAR(10) only.

How do I find and replace line breaks in Excel?

Press Ctrl+H to open Find & Replace. Click in the Find What field and press Ctrl+J โ€” this inserts the line break character (nothing visible appears, but it's there). In the Replace With field, type a space or leave it empty. Click Replace All to remove or replace all line breaks in the selected range or sheet.
Practice Excel Questions
โ–ถ Start Quiz