Start a New Line Inside a Spreadsheet Cell in Excel

by Gregory on October 2, 2010

Line Break Inside a Worksheet Cell

Sometimes it’s necessary to have more than one line inside a worksheet cell, which is easily done with a line break.

Add a new line by holding down the Alt key while you press enter. It’s the keyboard shortcut Alt+Enter. In Excel 2008 and 2011 for Mac use Cmd+Option+Enter.

Use a Line Break in a Cell

Fig. 1 - Use a Line Break in a Cell with Alt+Enter

A Potential Problem with Using Ctrl+Enter

The line break is the character code 10. While invisible to the eye in Excel, this character may create problems when exported into a database system by prematurely starting a new record every time it’s encountered.

Using Extra Spaces to Create a Line Break (Not Recommended)

I’ve seen Excel users who don’t know about this shortcut so they try and make the lines wrap inside the cell by providing extra spaces between words. Adding spaces may provide a worksheet cell that looks nice and correct, but an export will also include those extra spaces. (See the formula bar below)

Use Spaces to Wrap a Line in a Cell

Fig. 2 - Use Spaces to Wrap a Line in a Cell

Another problem with adding extra spaces is that, when the column width changes it can provide an unpredictable alignment. By looking in the formula bar you can see if there’s a proper line break (fig 1) OR extra spaces that might be problematic. (fig 2)

Expanding the Formula Bar in Excel 2007 and 2010

The formula bar typically doesn’t show more than one line. In the two figures above the formula bar has been expanded. You can do this with the keyboard shortcut Ctrl+Shift+U, which you’ll probably never remember, or you can select the drop-down arrow at the right side of the formula bar.

Expand Formula Bar

Formula Bar for 2003 and 2008

This keyboard shortcut doesn’t work in Excel 2008 or Excel 2008 for Mac, and there’s no drop-down arrow at the right side of the formula bar. When you encounter a cell with more than one line Excel automatically expands the formula bar. No manual intervention required.

This is why some users are stumped after upgrading to 2007 or 2010 and finding they can’t see the entire cell contents in the formula bar. I know I was. :)

Related Posts Plugin for WordPress, Blogger...

Comments on this entry are closed.

Previous post:

Next post: