Use an Ampersand in a Header


October 19, 2022 - by

Use an Ampersand in a Header

Problem: I added the custom header Profit & Loss Report to my report.

Trying to add a Left Header of Profit & Loss where the And is represented by an Ampersand. Typing Profit Ampersand Loss in the Header dialog will not work.
Figure 756. Include an ampersand in the header.

However, the actual header appears as Profit Loss Report. The ampersand is missing.

Although you asked for Profit Ampersand Loss, the header prints as Profit Loss - the Ampersand does not appear.
Figure 757. Excel leaves out the &.

Strategy: The ampersand is a special character in the custom header and footer field. To print an ampersand in the header, you have to type && in the Header dialog box.


To actually put an apersand in the header or footer, type two ampersands without a space in between. This is the code for Put a Single Ampersand.
Figure 758. Specify && while editing the header.

Having two ampersands will give you the desired heading Profit & Loss.

By using two ampersands in the dialog, you will get an actual header of Profit & Loss.
Figure 759. Excel will print the && as a single &.



This article is an excerpt from Power Excel With MrExcel

Title photo by Zhen Hu on Unsplash