Hide row and column headings in a worksheet

How to hide row and column headings in a worksheet using Excel and VBA methods

METHOD 1. Hide row and column headings in a worksheet using a ribbon option

EXCEL

Select worksheet > View tab > Show group > Uncheck Headings checkbox

1. Select the worksheet in which to hide the row and column headings.
Note: in this example we are hiding the row and column headings in Sheet 2.
Select a specific sheet - Excel 2016

2. Select the View tab. Select the View tab

3. Click on the Headings checkbox, in the Show group, to unselect the checkbox. Uncheck Headings checkbox

METHOD 2. Hide row and column headings in a worksheet using a ribbon option

EXCEL

Select worksheet > Page Layout tab > Sheet Options group > Headings > Uncheck View checkbox

1. Select the worksheet in which to hide the row and column headings.
Note: in this example we are hiding the row and column headings in Sheet 2.
Select a specific sheet - Excel 2016

2. Select the Page Layout tab. Select the Page Layout tab

3. Uncheck the View checkbox under the Headings title, in the Sheet Options group. Uncheck the Headings View checkbox

METHOD 1. Hide row and column headings in an active worksheet using VBA

VBA

Sub Hide_Row_Column_Headings()
'hide row and column headings in an active worksheet
ActiveWindow.DisplayHeadings = False

End Sub

METHOD 2. Hide row and column headings in a specific worksheet using VBA

VBA

Sub Hide_Row_Column_Headings()
'activate a worksheet named Sheet1 and hide row and column headings in that worksheet
Worksheets("Sheet1").Activate
ActiveWindow.DisplayHeadings = False

End Sub

PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.
ADJUSTABLE PARAMETERS
Worksheet Selection: Select the worksheet in which you want to hide the row and column headings by changing the Sheet1 worksheet name in the VBA code.

METHOD 3. Hide row and column headings in a specific worksheet with cell reference using VBA

VBA

Sub Hide_Row_Column_Headings()
'declare a variable

Dim ws As Worksheet
Set ws = Worksheets("Parameters")
'cell A1 in the Parameters worksheet contains the name of the worksheet in which we want to hide row and column headings
SheetName = ws.Range("A1")
'activate the worksheet and hide row and column headings
Worksheets(SheetName).Activate
ActiveWindow.DisplayHeadings = False

End Sub

PREREQUISITES
Parameters Worksheet Name: Have a worksheet named Parameters which captures the name of the worksheet in which you are hiding row and column headings.
Cell Reference of worksheet name: In this example cell ("A1"), in the Parameters worksheet, captures the name of the worksheet in which the row and column headings are being hidden.
ADJUSTABLE PARAMETERS
Parameters Worksheet Selection: Select the worksheet that captures the name of the worksheet in which you want to hide the row and column headings by changing the Parameters worksheet name in the VBA code.
Cell Reference of worksheet name: Select the cell that contains the name of the worksheet in which you want to hide the row and column headings by changing cell reference ("A1") in the VBA code.

METHOD 4. Hide row and column headings a worksheet nominated through an input box using VBA

VBA

Sub Hide_Row_Column_Headings()
'declare a variable
Dim SheetName As Variant
SheetName = InputBox("Enter the name of the worksheet in which you want to hide row and column headings")
Worksheets(SheetName).Activate
ActiveWindow.DisplayHeadings = False

End Sub

Explanation about how to hide row and column headings in a worksheet

EXPLANATION

EXPLANATION

This tutorial explains and provides step by step instructions on how to hide row and column headings in a single worksheet using Excel and VBA methods.
Excel Methods: This tutorial provides two Excel methods that can be applied to hide row and column headings in a single worksheet. Both of the methods are very similar to each other, with one using the View tab and the other using the Page Layout tab. Using either of the two methods you can hide the row and column headings, in a single worksheet, in three steps.
VBA Methods: This tutorial hides the row and column headings by setting the ActiveWindow.DisplayHeadings to False. It shows four VBA methods that can be applied to hide row and column headings.
The first VBA method hides the row and column headings in an active worksheet. The second VBA method activates a specific worksheet, which has been directly referenced to in the VBA code, and then hides the row and column headings. The third VBA method is similar to the second method, by activating a specific worksheet and then hiding the row and column headings. However, the third VBA method references to a specific cell that contains the name of the worksheet in which you want to hide the row and column headings. The forth method uses an input box which allows you to enter the name of the worksheet, in which you want to hide row and column headings, into the input box. The input box will appear when the macro is run.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to show row and column headings in a single worksheet using Excel and VBA methods
How to hide row and column headings in multiple worksheets using Excel and VBA methods
How to show row and column headings in multiple worksheets using Excel and VBA methods
How to hide row and column headings in a workbook using Excel and VBA methods
How to show row and column headings in a workbook using Excel and VBA methods