Formatting Issues

How to Use Bold Formatting Codes in Excel Headers and Footers

Phi Hung VoPhi Hung Vo Nov 10, 2026 870 views

Question details

The user wants to format text in Excel headers and footers using bold, italic, underline, and specific fonts by utilizing special formatting codes, while staying within the allowed character limit.

How to Use Bold Formatting Codes in Excel Headers and Footers
Product
Excel
Device & OS
not provided
Scenario
Customizing the appearance of text in printed worksheet headers and footers.
Observed behavior
Normal rich-text formatting cannot be applied directly in the standard way, requiring the use of ampersand (&) formatting codes within a strict 255-character limit.
Before you start

Verify the length of your header or footer text beforehand, keeping in mind that the strict 255-character limit includes all spaces and formatting codes.

Solution 1Recommended

Apply Special Formatting Codes in Page Setup

Use Excel's built-in header and footer ampersand (&) codes to manually apply styling like bold, italic, and specific fonts.

Excel enforces a maximum limit of 255 characters for headers and footers. Because standard direct formatting buttons are often disabled or ineffective in the basic Custom Header/Footer dialog, you must use designated formatting codes recognized by Excel to modify the text style.

1
Open Page Setup

Navigate to the 'Page Layout' tab on the ribbon, click the small dialog box launcher arrow in the bottom right corner of the Page Setup group, and switch to the 'Header/Footer' tab.

2
Access Custom Fields

Click either the 'Custom Header' or 'Custom Footer' button, depending on which section you want to format.

3
Apply Bold Formatting

To make a specific word or phrase bold, type &B before and after the text. For example, type '&BMy Bold Title&B' to ensure only that phrase is bolded.

4
Apply Italics, Underline, or Font Changes

Similarly, use &I to toggle italics on and off, &U for underlining, or &"FontName,FontSize" (e.g., &"Arial,12") to change the font face and size.

5
Save and Preview

Click 'OK' to save your changes, then use the Print Preview feature to verify that the formatting codes were interpreted correctly.

Apply Special Formatting Codes in Page Setup
Character Limits and Toggling: Formatting codes act as toggles. If you place &B before a word, the text following it becomes bold. Placing &B after the word turns the bold formatting off for any subsequent text. Remember that every character in the code counts toward your 255-character limit.

Easily Format Headers and Footers with WPS Office

WPS Spreadsheet offers an intuitive Header and Footer visual interface, allowing you to format page text easily without memorizing complex ampersand codes. It maintains perfect compatibility with your existing Microsoft Excel files.

  1. 1. Open your Spreadsheet: Launch WPS Office and open your workbook.
  2. 2. Insert Header or Footer: Navigate to the 'Insert' tab and click on the 'Header and Footer' option.
  3. 3. Apply Visual Formatting: Select the text in your header or footer and simply use the standard Bold (Ctrl+B), Italic (Ctrl+I), or Underline (Ctrl+U) buttons on the Home tab.
  4. 4. Exit and Save: Click anywhere outside the header and footer area to instantly apply and save your stylized text.
Fully compatible with Microsoft Excel formats (.xlsx, .xls) and standard header/footer behaviors.Intuitive visual interface that applies bold and italic styling without requiring manual code entry.Free, lightweight, and efficient office suite for fast document processing.
microsoft office alternative - wps office

Frequently Asked Questions

What happens if my header exceeds the 255-character limit?

If your total character count, which includes regular text, blank spaces, and formatting codes, surpasses 255 characters, Excel will either truncate the excess characters or display a warning error.

Can I combine multiple formatting codes in Excel headers?

Yes, you can combine formatting codes. For example, typing '&B&I' before your text will apply both bold and italic formatting simultaneously.

Do the formatting codes count toward the 255-character limit?

Yes, every individual character that makes up a formatting code (including the ampersand symbol and quotation marks) counts toward the total 255-character maximum limit.

How do I print an ampersand (&) in the header without it acting as a code?

To display a literal ampersand symbol in your header or footer text without triggering a formatting code, type a double ampersand (&&).