A header is a significant tool for presenting a dataset by adding a title, date, page no., or anything else at the top of the sheets in Excel. But occasionally, we might need to remove the header from documents. In this article, I’ll present to you 4 practical methods on how to remove a header in Excel including the VBA code.
How to Remove a Header in Excel: 4 Methods
Well, you are observing a header i.e. Product Order Records in bold-colored in the following screenshot. Now we are going to remove the header utilizing the 4 methods.
1. Using the Page Setup to Remove a Header in Excel
Firstly, we’ll see the most popular method for removing the header in a step-by-step process.
⏩ Go to Page Layout tab > click on the drop-down arrow located at the right bottom of the Page Setup ribbon.
⏩ Then you’ll find a dialog box namely the Page Setup as shown in the following figure.
⏩ Next, move the cursor on the Header/Footer option.
⏩ Choose the (none) option from the drop-down list, and lastly press OK.
⏩ You’ll get the following output if you do the above steps.
⏩ Furthermore, if you wish to remove the space invaded by the header, pick the Normal view from the View tab as depicted in the following picture.
So, your sheet will look as if you didn’t have any header.
Read More: How to Add Header in Excel
2. Deleting a Header While Printing from Excel
When you want to delete the header before printing the document, the following method will be highly beneficial for you.
In the beginning, you need to see the print preview by clicking File > Print > Print Preview (the keyboard shortcut is CTRL + P).
So, it is clear that we have a header in our document. Thereafter, choose the Page Setup option as indicated in the following screenshot.
Meanwhile, a dialog box i.e. Page Setup will be opened as earlier in the first method.
So, fix the Header as (none) from the Header/Footer option (red-colored in the picture).
Subsequently, you are going to get the following output where no header is available on the page while previewing the page for printing.
Read More: How to Add Same Header to All Sheets in Excel
- Similar Readings
- How to Print Excel Sheet with Header on Every Page in Excel
- How to Edit Header in Excel
- How to Move Header in Excel
- How to Maintain Excel Header Alignment
- How to Insert Logo in Excel Header
3. Method of Removing a Header from the Second Page
Again, we’ll implement an interesting but simple method for removing the header from the second page on the single working sheet.
Before doing that we need to understand how we can add different named headers within a worksheet.
⏩ Move the cursor over the selected cell for the current header and check the box before the Different First Page option from the Header & Footer tab. Now the header on the first page will be separate from the other headers.
⏩ Shift the cursor at the column of the right side (outside the current dataset) and select the Insert Page Break option from the Page Setup ribbon.
⏩ Then type a new header (Product Order Records-2) in the dedicated space of page-2.
⏩ Now, remove the header from the second page by choosing the Header as (none) from the Header & Footer tab.
⏩ Finally, you’ll get the following output where no header exists on the second page but exist on the first page.
In the same manner, you can delete the header from the first page without removing the header of the second page.
Related Content: How to Remove a Header in Excel
4. Using VBA Code to Remove a Header in Excel
Lastly, you may remove a single header or the number of headers within a sheet by using a simple VBA code.
The steps will be as follows-
Step 1:
As we want to use VBA, we must know how to insert a VBA code.
Firstly, open a module by clicking Developer > Visual Basic.
Secondly, go to Insert > Module.
Step 2:
Then copy the following code into the newly created module.
Sub Removing_Header()
With Sheets("Sheet4").PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
End With
End Sub
In the above code, I used Sheets collection to get the sheet (Sheet4) where I want to remove the header. Besides, I assigned PageSetup which holds all page setup properties (e.g. margins, header & footer, and so on). After assigning those, I fixed all types of the header (left, right & right header) as blank to remove the header existing in my worksheet.
Step 3:
Next, run the code (the keyboard shortcut is either F5 or Fn + F5) and the output will be as follows.
Related Content: How to Keep Header in Excel When Printing
Things to Remember
- If you want to just close the header immediately (instead of removing), just press Esc.
- Moreover, if you want to remove the header quickly, simply select the header and press the Delete or Backspace key.
Download Practice Workbook
Conclusion
On the whole, we explored 4 methods including the VBA code and some shortcuts to remove a header in Excel. I personally think that the above guideline surely will be useful for you.
Enjoy Excel and visit our website exceldemy, an outstanding platform for learning Excel!