Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Creating Two-Line Custom Formats.

Creating Two-Line Custom Formats

by Allen Wyatt
(last updated January 2, 2017)

12

Excel is quite flexible in how it allows you to set up custom formats for displaying all sorts of values. Most custom formats are straightforward and easy to figure out, once you understand how custom formats work. (Custom formats and how to set them up has been discussed fully in other issues of ExcelTips.)

What if you want to create a two-line custom format, however? For instance, you may want to format a date so that the abbreviated day of the week and day of the month is on the first line, followed by the unabbreviated name of the month on the second line. Using such a format, a date would appear in a single cell in this manner:

Sat 13
April

Most of this can be done by the custom format "ddd d mmmm", but you need to figure out a way to add a line break between the "d" and the "mmmm". Excel won't let you press Alt+Enter between them, which is what you normally do to add a line break.

The solution is to use the numeric keypad to enter the desired line break in the format. Follow these steps to set it up:

  1. Select the cells you want to format.
  2. Display the Home tab of the ribbon.
  3. Click the small icon at the bottom-right of the Number group. Excel displays the Number tab of the Format Cells dialog box.
  4. In the Category list, choose Custom. (See Figure 1.)
  5. Figure 1. The Number tab of the Format Cells dialog box.

  6. Delete whatever is in the Type box.
  7. Type "ddd d" without the quote marks.
  8. Hold down the Alt key while you press 0010 on the numeric keypad. This enters the line feed character, and it looks like the portion of the format you typed in step 6 disappears. It is not really gone; it has just moved up above what can be displayed in the Type box.
  9. Type "mmmm" without the quote marks.
  10. Click the Alignment tab. (See Figure 2.)
  11. Figure 2. The Alignment tab of the Format Cells dialog box.

  12. Make sure the Wrap Text check box is selected.
  13. Click OK.

After setting up the format in this manner, you will need to adjust the row height of the formatted cells so that the entire two lines of the date will display.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12587) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Creating Two-Line Custom Formats.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Locking a Field

When you use fields in your document, you may want them to not change from a particular displayed result. You can lock ...

Discover More

Creating a Header

When preparing your worksheet for printing, you may want to add a header that appears at the top of each page that you print. ...

Discover More

Collating Copies

When you print multiple copies of worksheets that require more than one page each, you'll probably want those copies printed ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Displaying Negative Percentages in Red

Excel includes quite a few different formats you can use for the information in a worksheet. One format that isn't as easy to ...

Discover More

Understanding Date and Time Formatting Codes

Want to apply a custom format to your dates and times? To do it effectively you need to understand the custom formatting ...

Discover More

Altering the Displayed Format of Numbers to the Nearest 100

Want information in a worksheet to be formatted and displayed as rounded to a power of ten? You may be out of luck, unless ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 3 + 8?

2017-01-04 17:24:09

Carter H.

On my laptop keyboard, I used the special NUMLock (something that has always just been a nuisance until now) and it worked! The key works like a shift or fn key as it changes a group of letter keys to number keys, making the keyboard appear to have a number pad (sort of, but the keys don't really line up the same as an actual number pad (which is why I never bothered to use it).


2017-01-04 17:15:46

Carter H.

In Excel 2016 I was unable to use Alt+0010. Any idea as to why it wouldn't work? All I got was an error chime.


2017-01-03 11:59:31

Dave Bonin

Amy's tip is crucial.
- Uncheck Wrap text
- Check Shrink to fit
- Check Wrap text

She just beat me to it.

BTW 1: I use Ctrl-J in place of Alt-0010.

BTW 2: On my Excel 2010, Allen's caution in step 7 of "... and it looks like the portion of the format you typed in step 6 disappears. It is not really gone; it has just moved up above...", does not apply. Nothing moves up in my type box. Instead, the second row of formatting appears in the bottom of the type box and I can just see the top pixels of the formatting characters.


2017-01-02 08:38:54

John Plant

Thanks Allen. Great tip, great instructions. Don't know if I'll ever use it but nice to have these things up one's sleeve :)
Cheers!


2015-03-26 19:34:05

Amy Blase

This IS cool. I found a solution for cell width issue on another page:

After you've formatted the cell as described, go to the Alignment tab
Uncheck Wrap text (if it's checked)
Check shrink to fit, then check wrap text

The columnwidth can be narrower (but still doesn't autofit). Setting the
rowheight is also manual.

Cheers!


2014-06-08 18:26:47

Paul Sieberhagen

If you have trouble with making this work I suggest you REMOVE the "[$-F800]" preceding the date format.
Once you format is working you can choose a suitable allingment. Also note that while the Day or Month name may be shorter teh minimum column width is 16 characters, if you use less than this you will see "#######".
I use this with Excel 2010 and have not tested it with any other version.


2014-06-02 18:07:07

Michelle Martin

I am following your example exactly, i click the alt key which is to the left of the space bare and then i use the number pad to enter the 0010. However, Excel is not recognizing the entry of the 0010 - you don't see it as it is being typed nor does it work if you just continue with the directions. Is there a different 'alt' key i should be using? Help would be appreciated!

Thanks alot!


2013-07-14 07:32:45

Michael (micky) Avidan

With all due respect - the tip was last updated/written on April 13, 2013 - so all later(!) comments could be shorten to one sentence:

Please refer to paragraph#7.

Michael Avidan
“Microsoft®” MVP – Excel
ISRAEL


2013-04-17 15:03:58

Aldo Santolla

This is something I didn't consider to use before in my cell formats. A very cool tip.

As for the ###### cell width size issues, well that happens with many format type that deal with numbers. Play around with text alignment, merges, and distribution to eliminate those nasty ###### from showing. Also make sure you test print. Sometimes if you don't size your cells properly you may get a screen view of your data, but during printing you could get ######.

One final comment ... all ALT+ special character access is always done using the number key pad. Laptops without a separate number key pad will need to have one connected (USB) or use the 'Character Map' app to access those special characters.


2013-04-16 09:33:24

Richard

Don - When using the Alt key to access characters in this way, the number keys are those on the Numeric keypad to the right of a standard keyboard.


2013-04-15 08:26:40

Don

Agree with Scott...cool tip!

I did find something that seemed odd. It may be because we are still running WinXP. When I used the numbers that run above the QWERTY, it wouldn't work. I got audio feedback that the keystroke was not valid. However, when I used the numbers keypad it worked fine.


2013-04-13 13:33:11

Scott Renz

This is cool. The drawback is that if I don't expand the width of the cell to much wider than visually necessary, it just shows a series of pound signs (########). As a result, I have to make the column much wider than the actual displayed text would need.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.