How to Use Bold Formatting Codes in Excel Headers and Footers
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.

- 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.
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.
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.
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.
Click either the 'Custom Header' or 'Custom Footer' button, depending on which section you want to format.
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.
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.
Click 'OK' to save your changes, then use the Print Preview feature to verify that the formatting codes were interpreted correctly.

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. Open your Spreadsheet: Launch WPS Office and open your workbook.
- 2. Insert Header or Footer: Navigate to the 'Insert' tab and click on the 'Header and Footer' option.
- 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. Exit and Save: Click anywhere outside the header and footer area to instantly apply and save your stylized text.

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 (&&).




