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

Creating Two-Line Custom Formats

by Allen Wyatt
(last updated September 15, 2016)

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 4
March

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. Choose Cells from the Format menu. Excel displays the Number tab of the Format Cells dialog box.
  3. In the Category list, choose Custom. (See Figure 1.)
  4. Figure 1. The Number tab of the Format Cells dialog box.

  5. Delete whatever is in the Type box.
  6. Type "ddd d" without the quote marks.
  7. 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 5 disappears. It is not really gone; it has just moved up above what can be displayed in the Type box.
  8. Type "mmmm" without the quote marks.
  9. Click the Alignment tab. (See Figure 2.)
  10. Figure 2. The Alignment tab of the Format Cells dialog box.

  11. Make sure the Wrap Text check box is selected.
  12. 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 (2895) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) 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

Getting Rid of Alphabetic Characters

When you need to get rid of characters in the middle of a cell value, the best way to do it is through the use of macros. ...

Discover More

Centering Information in Table Cells

One of the most common ways to format information in a table is to apply some sort of alignment to the contents of table ...

Discover More

Deleting a Macro

Macros are often created to accomplish a specific task, after which they are no longer needed. If you need to delete a macro ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

MORE EXCELTIPS (MENU)

Formatted Dates Appear Differently on Different Systems

When you format a date in a specific manner, you may be surprised to see that the format changes when you open the workbook ...

Discover More

Filling a Cell

One way you can format a cell is so that its contents are repeated over and over again for the entire width of the cell. It's ...

Discover More

Indenting Cell Contents

Excel allows you to apply several types of alignments to cells. One type of alignment allows you to indent cell contents from ...

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 for this tip:

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

This Site

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

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.

Links and Sharing
Share