Excel Practice Test

β–Ά

You hit Enter expecting a new line inside a cell. Instead, Excel jumped you to the row below. Frustrating, right? A line break in Excel cell needs a different keystroke, and once you learn it, your spreadsheets get a lot easier to read. Whether you're formatting addresses, building a notes column, or cleaning imported data, knowing how to insert, remove, and find line breaks saves real time.

This guide walks through every method that works in Excel 2010 through Microsoft 365, plus the Mac shortcuts, the CHAR(10) formula trick, and how to strip line breaks from messy CSV imports. We'll also cover what to do when Wrap Text isn't cooperating and your line breaks just won't show up.

Excel's approach to line breaks reflects a quirk of its history. The Enter key has always meant "commit and move down" because that's how visual spreadsheets work. A line break inside a cell needed a different keystroke, and Microsoft picked Alt+Enter as the alternative. Once you internalize that distinction, all the other tricks fall into place.

The good news: once you know the right keystroke, line breaks become second nature. Most people use them daily without thinking. The hard part is the first ten minutes of figuring out why Enter does the wrong thing. We'll cover that in detail, plus the lesser-known tricks that experienced Excel users keep in their back pocket for messy data days.

A quick warning before we dive in β€” line breaks can interact badly with VLOOKUP, sorting, and CSV exports, so we'll cover both how to add them and when to avoid them. Skip ahead to the Best Practices section if your data pipeline depends on clean single-line values.

Line Break Quick Reference

Alt+Enter
Windows shortcut
Ctrl+Opt+Enter
Mac shortcut
CHAR(10)
Formula method
Wrap Text
Required to display

The Fastest Way: Alt + Enter

On Windows, the simplest method is the keyboard shortcut. Double-click the cell to enter edit mode, or press F2 to jump in. Position your cursor exactly where you want the break. Then press Alt + Enter and Excel inserts a line break right there. The row height adjusts automatically. Press Enter normally when you're done to confirm the cell content. You can insert multiple breaks in the same cell β€” just press Alt+Enter at each break point.

This shortcut works in every modern version of Excel for Windows. It's the same in Excel 2010, 2013, 2016, 2019, 2021, and Microsoft 365. The behavior never changed because too many users rely on it. The shortcut also works in the formula bar at the top of the window, which helps when the cell itself is small or the content is long.

One thing trips people up: the cell must already have Wrap Text turned on, or the line break exists but stays invisible. You'll see a tiny gap but the text won't actually wrap. Some users see the break visible during editing but invisible after pressing Enter. That's Wrap Text being off, every single time.

If you work across multiple machines (say, a desktop at the office and a laptop at home), test the shortcut on each. Different keyboard hardware sometimes maps modifier keys differently. We've seen rare cases where a third-party keyboard remapper intercepts Alt+Enter and prevents Excel from seeing it. Disable any global hotkey utilities to confirm the issue.

Mac Users: Different Shortcut

Mac keyboards don't have an Alt key labeled the same way, and Excel for Mac uses a different combination. To add a line break in a cell on macOS, press Control + Option + Return. Some Mac users also report success with Command + Option + Return, depending on the Excel version and keyboard layout. Both insert the same line feed character.

If neither shortcut works, check your keyboard input source in System Settings. International keyboard layouts sometimes remap the Option key. A quick test: open a fresh cell, type "Line one", press the shortcut, then type "Line two". If you see two lines after pressing Return, you've got the right combo.

Excel for Mac also supports the CHAR(10) formula method described below, which works identically across platforms. If you build templates shared between Mac and Windows users, formulas are more reliable than shortcuts because the same workbook behaves identically everywhere. This becomes especially important when you collaborate via OneDrive or SharePoint, where editors may switch between desktop apps and the web client.

Platform-Specific Methods

πŸ”΄ Windows

Press Alt + Enter while editing a cell in any modern version of Excel from 2010 through Microsoft 365. The shortcut works in both the cell itself and the formula bar at the top of the window.

🟠 Mac

Press Control + Option + Return inside an Excel cell on macOS. Command + Option + Return works in newer versions. Both insert the same CHAR(10) line feed character.

🟑 Formula

Use CHAR(10) joined with the ampersand operator to insert breaks programmatically. =A1 & CHAR(10) & B1 stacks two cell values vertically when Wrap Text is on.

🟒 Web App

Excel Online accepts Alt+Enter on Windows browsers and Option+Return on Mac browsers. Works in Chrome, Edge, Firefox, and Safari with minor variations for older macOS Safari versions.

Wrap Text: The Setting That Makes Breaks Visible

Inserting a line break is only half the job. Excel won't display it unless the cell has Wrap Text enabled. Without Wrap Text, your break exists in the cell data but the row stays one line tall and you see a small square instead of the line wrap.

To turn on Wrap Text, select the cells you want to format. Go to the Home tab on the ribbon. In the Alignment group you'll see a button labeled "Wrap Text" with an icon showing text wrapping. Click it. The selected cells now display line breaks correctly.

For details on the broader formatting toolkit, see our guide to format cells in Excel. Once Wrap Text is on, the row height adjusts automatically to show all the lines. You can manually drag the row border if you want a specific height instead of auto-fit.

If you want the row to stay a fixed height despite the wrapped content, set the row height manually after enabling Wrap Text. Excel preserves the manual setting until you double-click the row border or use Format > Row Height > AutoFit. Manual heights are useful for printed reports where every row should look identical regardless of content length.

Line Break Checklist

Click into the cell or press F2 to enter edit mode β€” the cell border thickens to show edit state is active
Position the cursor at the exact spot where you want the break to appear in the visible text
Press Alt+Enter on Windows or Control+Option+Return on Mac to insert a line feed character at the cursor
Type the next portion of text, then press Enter normally to confirm and exit the cell
Enable Wrap Text from the Home tab in the Alignment group so the break actually shows visually
Adjust row height by dragging the bottom border or double-clicking it for auto-fit

Using CHAR(10) in Formulas

When you build a cell value with a formula, the keyboard shortcut won't help. You can't press Alt+Enter inside a formula bar and expect it to insert a line break into the result. Instead, you concatenate CHAR(10) between the pieces you want on separate lines.

Here's a basic example. Suppose A1 holds a first name, B1 holds a last name, and C1 holds a city. Type this into D1: =A1 & CHAR(10) & B1 & CHAR(10) & C1. Press Enter. Without Wrap Text, you'll see something like "Johnβ–―Smithβ–―Chicago". Turn on Wrap Text and the three pieces stack on three lines.

CHAR(10) is the line feed character, ASCII code 10. Inside a single Excel cell, CHAR(10) is the standard. You may occasionally see CHAR(13) used, which is the carriage return. Most modern Excel versions accept either, though CHAR(10) is the safer choice.

This formula approach scales well. If you have 5,000 rows of customer data with separate columns for street, city, state, and ZIP, one CHAR(10)-based formula gives you a properly formatted mailing label column in seconds.

One more formula-related trick: you can nest CHAR(10) inside IF statements to create conditional line breaks. For example, =A1 & IF(B1="", "", CHAR(10) & B1) only adds the break and the second value when B1 is not empty. This keeps your output tidy when some rows have partial data. Combine this with IFERROR for even more robust handling of sparse inputs from external systems where some columns are routinely blank.

Methods Compared

πŸ“‹ Concatenate

Use =A1 & CHAR(10) & B1 to join two cells with a line break between them. This is the simplest formula approach and works in every Excel version going back to Excel 2007. Add more cells and CHAR(10) calls to stack additional lines. Wrap Text must be enabled for the break to display.

πŸ“‹ TEXTJOIN

Excel 2019 and later support =TEXTJOIN(CHAR(10), TRUE, A1:A5) to join an entire range with line breaks. The TRUE flag tells TEXTJOIN to skip empty cells, which is convenient for sparse data. This is the cleanest method for stacking dynamic ranges or sparse lists into one cell.

πŸ“‹ Manual

Type your text, press Alt+Enter at the break point, then continue typing. Best for one-off cells like header labels, sticky notes inside a workbook, or template placeholders. Not scalable for thousands of rows where you'd want a formula-driven approach instead.

πŸ“‹ Find/Replace

Open Find & Replace with Ctrl+H, hold Alt and type 010 on the numeric keypad in the Find field to search for line breaks. The character is invisible in the field but Excel finds it. Useful for bulk-adding breaks via a pattern, or for replacing them with commas or spaces.

Try Our Excel Practice Test

Removing Line Breaks From Cells

Imports from CSV files, web scrapes, and database exports often arrive with stray line breaks that wreck your filters and lookups. There are three main ways to strip them out, and the right one depends on whether you want to remove every break or only some.

The fastest mass-cleanup is Find & Replace. Press Ctrl+H to open the dialog. Click in the "Find what" field. Hold Alt and type 010 on the numeric keypad. You won't see anything appear in the field, but the line feed character is now there. Leave "Replace with" empty or type a space if you want the lines separated. Click Replace All. Every line break in your selection disappears.

The formula approach uses CLEAN or SUBSTITUTE. =CLEAN(A1) removes all non-printable characters including line breaks. =SUBSTITUTE(A1, CHAR(10), " ") swaps line feeds for spaces specifically. Use CLEAN when you want a quick sweep, SUBSTITUTE when you need precise control over the replacement character.

VBA users can loop through a range and call Replace(cell.Value, vbLf, " "). This is overkill for most workflows but useful inside larger macros that already process cell data. For more on automating Excel work, check our overview of Excel formulas and functions.

If the line breaks came from a known source (like a specific app or paste-from-website pattern), you may be able to set up a Power Query transformation to strip them automatically on every refresh. Power Query is built into modern Excel and its Replace Values step accepts CHAR(10) targeted via the Trim and Clean operations under Transform > Format.

Watch Out for Hidden Characters

Imported data sometimes contains both CHAR(10) and CHAR(13). If CLEAN doesn't fully fix the problem, run a second SUBSTITUTE for CHAR(13). Pasting from Word or Outlook is the most common source of mixed line break types. Always check the actual characters in suspicious cells before assuming a single cleanup pass is enough.

Finding Cells That Contain Line Breaks

Before you clean up, you may want to know which cells contain breaks. Find & Replace handles this too. Press Ctrl+F. In the Find field, hold Alt and type 010 on the numeric keypad. Click "Find All". Excel lists every cell containing a line feed. You can then review them before deciding whether to replace.

A formula version uses ISNUMBER with SEARCH. Put =ISNUMBER(SEARCH(CHAR(10), A1)) in a helper column. Cells that return TRUE contain at least one line break. Filter on TRUE and you have your list. This is the right approach when you need a permanent audit trail or you're building a data quality dashboard.

For really large workbooks, conditional formatting with a formula rule highlights affected cells visually. Select your data range, open Conditional Formatting, choose "New Rule", pick "Use a formula to determine which cells to format", and enter the same ISNUMBER formula. Pick a fill color. Every cell with a hidden line break lights up.

Conditional formatting on line-break-containing cells is also useful during data review. Pair it with a count of breaks per cell using =LEN(A1)-LEN(SUBSTITUTE(A1, CHAR(10), "")). The result is the exact number of line breaks. You can sort or filter by this count to find your worst offenders first.

Best Practices for Multi-Line Cells

Line breaks are powerful, but they create headaches when you don't think ahead. Before you decide to use breaks in a column, ask yourself whether you'll later need to filter, sort, or look up that data. VLOOKUP and INDEX/MATCH treat the whole cell including the breaks as one value, so an exact match has to include the breaks. Most users find this surprising the first time it bites them.

A safer pattern for data that needs filtering is to store fields in separate columns and use a helper formula to build a display version with CHAR(10) for printing or visual review. Your raw data stays clean, your lookups still work, and you get the multi-line display when you actually want it. This separation also makes pivot tables behave correctly.

Another best practice: document your use of line breaks in a workbook README sheet. When someone else opens your file six months later, they'll wonder why one column has weird vertical spacing. A two-sentence note saves a lot of confusion.

Finally, watch how line breaks export. CSV files written by Excel will quote any cell containing a line break and embed the break inside the quotes. Most CSV readers handle this correctly, but older import tools may split the cell across multiple rows.

If your team uses a shared template, agree on whether line breaks are allowed in specific columns and document the rule. Disagreement here is a frequent source of broken pivot tables and surprising lookup failures. A short style guide pinned to a hidden sheet usually settles future debates before they start. The rule of thumb most teams settle on: store atomic values in the underlying columns, and only use CHAR(10) in dedicated display columns that nothing downstream parses.

Test Your Excel Skills

Common Problems and Fixes

Sometimes Alt+Enter just doesn't work. The most frequent cause is a numeric keypad issue. On compact laptops without a dedicated numpad, Alt+Enter still works because it uses the standard Enter key, not the numpad version. But if you're using NumLock-toggled Fn keys, double-check that NumLock is in the right state for your shortcut path.

If breaks insert but don't show, Wrap Text is off. Toggle it on from the Home tab. If breaks show but row height is wrong, double-click the bottom border of the row header to auto-fit. If your formula uses CHAR(10) but only displays a square, Wrap Text is again the answer.

Another sneaky issue: locked or protected sheets. If a worksheet is protected and the cell is locked, you can't edit it to add a break. Unprotect the sheet or unlock the specific cells through Format Cells > Protection. After unlocking, re-apply protection if you need it for the rest of the workbook.

If none of these fixes work, restart Excel. A surprising number of keyboard shortcut issues vanish after a fresh launch because shortcut conflicts from other add-ins disappear when the application reloads.

If you regularly handle data from a specific source that injects line breaks, save your cleanup steps as a Power Query script or a macro. Reusable cleanup saves you from solving the same problem every Monday morning. The investment pays back within the first few uses. Consider also building a small validation sheet that flags rows with unexpected line breaks via the ISNUMBER+SEARCH pattern, so you catch new variants of broken input before they corrupt downstream analysis.

For teams working in shared Microsoft 365 environments, you can publish your cleanup macro as part of a shared add-in. That way every team member runs the same cleanup with one click, and you avoid the situation where one analyst's local copy of the workbook handles breaks correctly while another's does not. The consistency pays back even more when audit time arrives.

Excel Questions and Answers

What's the keyboard shortcut for a line break in Excel?

On Windows, press Alt+Enter while editing a cell to insert a line break at the cursor position. On Mac, press Control+Option+Return. Both shortcuts insert a line feed character (CHAR(10)). The cell must have Wrap Text enabled for the break to display visually.

Why doesn't my line break show up?

The cell needs Wrap Text enabled. Go to the Home tab and click the Wrap Text button in the Alignment group. The break exists in the data but won't display until wrapping is turned on. You can also right-click, choose Format Cells, switch to the Alignment tab, and check the Wrap text checkbox.

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

Use CHAR(10) joined with the ampersand operator. For example, =A1 & CHAR(10) & B1 puts the contents of A1 on one line and B1 on the next line. Enable Wrap Text on the cell so the break displays. For ranges, use TEXTJOIN(CHAR(10), TRUE, A1:A5) in Excel 2019 and later.

How do I remove line breaks from a column of cells?

Open Find & Replace with Ctrl+H. Click in the Find field, hold Alt, and type 010 on the numeric keypad. Leave Replace with empty or type a space, then click Replace All. You can also use =CLEAN(A1) or =SUBSTITUTE(A1, CHAR(10), " ") in a helper column for formula-based cleanup.

Does Alt+Enter work in Excel Online?

Yes, on Windows browsers. Mac users press Option+Return inside the Excel web app at office.com or in OneDrive. Most modern browsers handle this identically. Safari occasionally needs an extra Control modifier on older macOS versions. The same workbook opened in desktop Excel uses the standard platform shortcut.

What's the difference between CHAR(10) and CHAR(13)?

CHAR(10) is line feed (LF) and is the standard for line breaks inside Excel cells. CHAR(13) is carriage return (CR) and shows up mostly in imported data from older Windows-based systems or text files. Use CHAR(10) for all new content. When cleaning imported data, run SUBSTITUTE for both characters to be safe.

Can I find cells that contain line breaks?

Yes. Press Ctrl+F, hold Alt, and type 010 in the Find field on the numeric keypad. Click Find All to list every cell containing a line break. You can also use the helper formula =ISNUMBER(SEARCH(CHAR(10), A1)) in a column and filter for TRUE. Conditional formatting with the same formula highlights affected cells visually.
β–Ά Start Quiz