The quickest way to change a header in Excel

To change a header in Excel, click the cell containing the header text, type the new text, and press Enter. That's the basic move — it works whether your headers are in row 1 or anywhere else on the sheet.

If you want to change the header row itself (move it, freeze it, or swap which row acts as your header), the process depends on what you're trying to do. Excel doesn't have a single "change header" button; instead, you work with the cells directly or use the Freeze Panes feature to tell Excel which row to treat as a permanent header.

Key Takeaways

  • Click any header cell, type new text, and press Enter to change what the header says.
  • To freeze a header row so it stays visible when you scroll, select the row below your headers and go to View > Freeze Panes > Freeze Panes.
  • To move your header row to a different location, select the entire row, cut it, click where you want it, and paste.
  • To add a header row where none exists, right-click the row number and select Insert to create a blank row at the top.

Editing header text directly

Click the cell that contains the header you want to change. The cell reference box at the top left will show you which cell is selected. Type the new header name and press Enter. Excel moves you to the next cell down; if you want to edit another header in the same row, press the up arrow to go back to row 1, then move left or right to the next header.

If your header text is long, you can widen the column to see it all. Double-click the line between two column letters at the top — Excel auto-fits the column width to the text. Or click and drag that line to set the width yourself.

Freezing a header row so it doesn't scroll away

When you have many rows of data, you want the header row to stay at the top even when you scroll down. This is called freezing the header row. Click on the row number of the row directly below your headers. If your headers are in row 1, click the number 2. Then go to the View tab at the top of the ribbon and click Freeze Panes, then Freeze Panes again from the dropdown menu.

You'll see a thin line appear below your header row. Now when you scroll down, the header row stays fixed at the top. To unfreeze, go back to View > Freeze Panes > Unfreeze Panes.

If your headers are not in row 1 — for example, you have a title in row 1 and headers in row 2 — click on row 3 before freezing. Excel freezes everything above the row you select.

Moving a header row to a different location

Click the row number on the left side to select the entire row. Right-click and choose Cut (or press Ctrl+X on Windows, Command+X on Mac). Click the row number where you want the header to go, right-click, and choose Insert Cut Cells. Excel inserts a new row at that location and moves your header there, shifting other rows down.

If you just want to move the header text without inserting a new row, select and copy the header cells instead, click the new location, and paste. This overwrites whatever was in the destination cells, so check first that you're not losing data you need.

Adding a header row when you don't have one

If your data starts in row 1 with no header row above it, right-click the row number 1 on the left and select Insert. Excel creates a blank row at the top and pushes your data down. Now row 1 is empty and ready for headers. Type your column names in each cell.

Alternatively, you can click on row 1, then go to Home > Insert > Insert Sheet Rows to do the same thing from the ribbon.

Changing header formatting without changing the text

Select the header row by clicking the row number. Go to the Home tab and use the formatting tools: Bold, font color, background color, or borders. Many people make headers bold and give them a background color so they stand out from the data below.

To explore the same formatting to all headers at once, select the entire header row, then explore the formatting. To format individual headers differently, click each cell and format it separately.

Using the first row as headers in a table or pivot table

If you're creating a table in Excel, select your data including the header row and go to Home > Format as Table. Excel recognizes the first row as headers automatically. If your headers are in a different row, select from that row down, and Excel will still treat the top row of your selection as headers.

For a pivot table, go to Insert > Pivot Table, select your data range, and Excel again assumes the first row is headers. If your headers are elsewhere, adjust your selection before creating the pivot table.

Frequently Asked Questions

Can I have headers in multiple rows?

Excel treats only one row as the header row at a time. If you need multiple rows of labels, freeze both rows by selecting the row below them before freezing. You can also format multiple rows the same way, but Excel's table and pivot table features recognize only the top row as headers.

What if I accidentally delete a header?

Press Ctrl+Z (Command+Z on Mac) when ready to undo the deletion. If you've already saved the file, you can't recover the deleted text from within Excel. Keep a backup of important spreadsheets to avoid losing headers or data.

How do I change a header in a table I already created?

Click the header cell in the table and type the new name. Excel updates the header automatically. If you need to add or remove columns from the table, right-click the table and choose Table Design or use the Table Design tab that appears when the table is selected.

Can I use a formula as a header?

Technically yes, but it's not recommended. Headers should be text labels so that sorting, filtering, and pivot tables work correctly. If you put a formula in a header cell, Excel may treat it as data rather than a label, which can cause problems with those features.

How do I change the header in a filtered or sorted list?

Click the header cell and type the new text just as you normally would. Filtering and sorting don't lock the header row, so you can edit it at any time. If you've frozen the header row, it stays frozen while you edit.