Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Fix a Heading in Excel: Merge, Wrap and Format

· 8 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

A broken heading in Excel is almost always one of four things: the text is cut off or spilling into other cells, it is merged across a row you now need to sort or filter, it has lost its bold or fill formatting, or the header row has stopped repeating on printed pages or disappeared from view after scrolling. The fix for a cut-off heading is usually Wrap Text plus a taller row, or merging and centering the cells above your data. For a header that will not sort properly, unmerge everything first, then set the heading as a single row of labels and turn on Freeze Panes so it stays visible while you scroll. Nothing here needs add-ins or macros, and unless you are reworking a large sheet, most fixes take a minute or two.

The word "heading" can mean different things in Excel, so the steps below are grouped by what you are actually trying to repair. A quick note on menus: Excel's ribbons look slightly different on Windows, Mac, the web version and mobile apps, and Microsoft occasionally renames things between versions and regions. If a button is not where these steps say, look in the same tab for the closest-sounding option.

What You'll Need

  • Excel for Windows, Excel for Mac, Excel for the web, or the Excel mobile app (steps for desktop and web are the main ones; mobile differences are noted).
  • The workbook containing the heading you want to fix, ideally saved first so an unwanted change can be undone or closed without saving.
  • Enough empty space above and beside the heading to type it out, and if you plan to add page numbers or a date, a working printer for a quick preview check.

Step-by-Step

Fix a heading that is cut off or spilling

  1. Select the cell holding the heading text. Look at the formula bar: if the full sentence is there but only part shows on the sheet, the cell is simply too narrow.
  2. On the Home tab, choose Wrap Text. The heading will now break onto multiple lines inside the cell instead of running over the neighbouring cells.
  3. If the row is still too short to show every line, hover the line between the row numbers at the left of that row until the cursor changes to a resize arrow, then drag downward. Alternatively, select the row header, then on the Home tab open Format and choose AutoFit Row Height.
  4. If the heading labels a group of columns and you want it centred above them, select all those cells including the heading, then on the Home tab choose Merge & Center. Use Merge Cells or Merge Across instead if you want the merged cell left-aligned or merged per row.
  5. If a neighbouring cell already contains data, Excel cannot spill the heading into it. Either widen the column by double-clicking the divider between column letters (this autofits to the widest entry), or move the heading into the cells you intend to merge.

Fix a heading that broke sorting, filtering or formulas

  1. Select the row containing the heading. If Merge & Center is highlighted on the Home tab, the merged cells are the likely culprit, because Excel cannot sort a table whose header row contains merged cells.
  2. With those cells selected, click Merge & Center again to unmerge them. The text stays in the upper-left cell of the old merge, so check nothing was lost.
  3. Put each label in its own cell on a single row directly above the data, with no blank rows between.
  4. Select the heading row and the data beneath it, then on the Data tab choose Filter. Small drop-down arrows will appear in each heading cell, confirming Excel recognises that row as the header.
  5. If Excel does not treat the first row as headings, click inside the data, then use Home > Format as Table and tick the option that the table has headers. Convert to Range later if you no longer want the table styling.

Fix a heading that vanished while scrolling or stopped repeating on printouts

  1. To keep the heading on screen while scrolling, select the first cell just below your heading row, then on the View tab choose Freeze Panes > Freeze Panes. Everything above and left of your selection stays fixed.
  2. To make the heading appear at the top of every printed page, go to Page Layout > Print Titles. In the Rows to repeat at top box, click the row header of your heading row (or type a reference like $1:$1), then click OK.
  3. Check the result with File > Print, or press Ctrl+P. If the heading appears on page two but not page one, your print area selector may be set to a range that starts below the heading; clear or resize it under Page Layout > Print Area.

Fix heading formatting that will not change

  1. Select the heading cells and check the Font and Fill Color buttons on the Home tab. A heading can look "broken" simply because it still carries cell fill or a font colour that clashes with your new theme.
  2. To strip everything and start clean, click the Clear button on the Home tab and choose Clear Formats, then reapply bold, a larger font size and your chosen fill one at a time.
  3. If formatting seems to come back after you fix it, the workbook probably has conditional formatting on those cells. Select them, then Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
  4. To make every future heading consistent, set styles: right-click your chosen heading style under the Home tab's cell styles gallery and choose Modify to update it, or apply a built-in style such as Heading 3 to your heading row.

Common Mistakes

  • Merging the whole header row into one cell. This looks tidy but stops sorting, filtering and pivot tables from using those labels. Merge only a title above the labels, never the labels themselves.
  • Adding a second heading row in the middle of data. Subtotals or repeated labels inside a data range make sort and filter treat the table as several mini-tables.
  • Pressing Enter inside a cell to make a heading wrap. That inserts a manual line break that stays fixed even when the column widens; Wrap Text adjusts automatically instead.
  • Pasting headings from another document with hidden formatting. Use Paste Special > Values when bringing labels in from Word or a web page, then rebuild the formatting.
  • Freezing too many panes. Selecting a far-down cell before freezing locks rows you did not intend to keep on screen, leaving very little room for the data.

Tips

  • Double-clicking the divider between two column letters autofits that one column, which is often faster than Wrap Text for short headings.
  • Highlight the divider and double-click to fit the whole selection at once: autofit a group of selected columns in one action.
  • Keep headings short and put the detail in a comment or a separate notes row, so columns stay readable without merging.
  • Use Alt+Enter (Option+Return on Mac) for a deliberate line break in a heading only when you intend it to stay, and remember Wrap Text is the adjustable alternative.
  • Apply a table style instead of hand-formatting: headings stay bold with a fill and the table grows automatically as you add rows.
  • Before sending a file, check the print preview once so a fixed heading is not misplaced in the printout.

Troubleshooting

Merge & Center is greyed out. The selection is probably inside a table or a protected sheet. For a table, right-click and convert it to a range first; for protection, use Review > Unprotect Sheet if you know the password.

The heading text disappeared after unmerging. Excel keeps only the upper-left value of a merged range. Press Ctrl+Z immediately to undo, or type the text back into the first cell.

Wrap Text is on but the row is still one line tall. The row height has been set manually, which stops autofit. Select the row, then Home > Format > AutoFit Row Height.

Sort keeps complaining about merged cells. Search the whole data range for merges, including ones far to the right of the visible columns, and unmerge them all before sorting again.

Freeze Panes does nothing. Check whether the sheet is in Page Break Preview; freezing only works in Normal view. Also confirm you are not already in a split view, which limits where panes can freeze.

A heading on mobile looks fine but is cut off on desktop. The phone app reformats for screen width, so trust the desktop or web version for what the printed or shared file will look like. Mobile apps also hide some layout controls, so do merges and print titles on desktop or the web.

If a change makes things worse, close the workbook without saving rather than trying to undo a long chain of edits, then reopen a saved copy and work from there.

Frequently Asked Questions

How do I make a heading span several columns without merging?

Type the heading in the leftmost cell and leave the cells to its right empty; Excel displays the overflow across them. Centre it with the alignment buttons and it will appear to span the range while each cell stays independently sortable.

Why does my heading row no longer freeze after I add rows above it?

Freeze Panes is anchored to a fixed position, so inserting rows above it shifts the boundary. Unfreeze from the View tab, reselect the cell below the new heading row, and freeze again.

Can I put a different heading on each printed page section?

Use Page Layout > Print Titles > Rows to repeat at top for the same heading on every page, or insert manual page breaks and type a separate heading above each block. Print titles repeat the whole chosen row, not part of it.

Is there a way to fix headings across many sheets at once?

Yes, if the sheets are contiguous. Right-click a sheet tab and choose Select All Sheets, or hold Shift and click across the tabs, then apply the formatting once. Each sheet still needs its own Print Titles if you want printed repeats.

Does Excel treat the first row as a heading automatically?

Only when you create an Excel table, or when you apply a filter or sort and confirm the "My data has headers" option. Otherwise Excel treats every row, heading included, as ordinary data in most operations.

Can I recover a broken heading from an older version of the file?

If the workbook was saved with AutoRecover or has version history, open File > Info and look for previous versions. Otherwise reopen the most recent saved copy, which is why saving before you start editing matters.