Show row and column headings in a worksheet
How to show row and column headings in a worksheet using Excel and VBA methods
Select worksheet > View tab > Show group > Check Headings checkbox
1. Select the worksheet in which to show the row and column headings. Note: in this example we are showing the row and column headings in Sheet 2. |
2. Select the View tab. |
3. Click on the Headings checkbox, in the Show group, to select the checkbox. |
Select worksheet > Page Layout tab > Sheet Options group > Headings > Check View checkbox
1. Select the worksheet in which to show the row and column headings. Note: in this example we are showing the row and column headings in Sheet 2. |
2. Select the Page Layout tab. |
3. Check the View checkbox under the Headings title, in the Sheet Options group. |
METHOD 1. Show row and column headings in a worksheet using VBA
VBA
Sub Show_Row_Column_Headings()
'show row and column headings in the active worksheet
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayHeadings = True
End Sub
METHOD 2. Show row and column headings in a specific worksheet using VBA
VBA
Sub Show_Row_Column_Headings()
'activate a worksheet named Sheet1 and show row and column headings in that worksheet
Worksheets("Sheet1").Activate
ActiveWindow.DisplayHeadings = False
Worksheets("Sheet1").Activate
ActiveWindow.DisplayHeadings = False
End Sub
PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.
Worksheet Name: Have a worksheet named Sheet1.
ADJUSTABLE PARAMETERS
Worksheet Selection: Select the worksheet in which you want to show the row and column headings by changing the Sheet1 worksheet name in the VBA code.
Worksheet Selection: Select the worksheet in which you want to show the row and column headings by changing the Sheet1 worksheet name in the VBA code.
ADDITIONAL NOTES
Note 1: In this example we are assuming that the row and column headings in Sheet1 are hidden before the macro is run.
Note 1: In this example we are assuming that the row and column headings in Sheet1 are hidden before the macro is run.
METHOD 3. Show row and column headings in a specific worksheet with cell reference using VBA
VBA
Sub Show_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 show row and column headings
SheetName = ws.Range("A1")
SheetName = ws.Range("A1")
'activate the worksheet and show row and column headings
Worksheets(SheetName).Activate
ActiveWindow.DisplayHeadings = True
Worksheets(SheetName).Activate
ActiveWindow.DisplayHeadings = True
End Sub
PREREQUISITES
Parameters Worksheet Name: Have a worksheet named Parameters which captures the name of the worksheet in which you are showing 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 showen.
Parameters Worksheet Name: Have a worksheet named Parameters which captures the name of the worksheet in which you are showing 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 showen.
ADJUSTABLE PARAMETERS
Parameters Worksheet Selection: Select the worksheet that captures the name of the worksheet in which you want to show 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 show the row and column headings by changing cell reference ("A1") in the VBA code.
Parameters Worksheet Selection: Select the worksheet that captures the name of the worksheet in which you want to show 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 show the row and column headings by changing cell reference ("A1") in the VBA code.
ADDITIONAL NOTES
Note 1: In this example we are assuming that the row and column headings are hidden in the specific worksheet, before the macro is run.
Note 1: In this example we are assuming that the row and column headings are hidden in the specific worksheet, before the macro is run.
METHOD 4. Show row and column headings a worksheet nominated through an input box using VBA
VBA
EXPLANATION
This tutorial explains and provides step by step instructions on how to show row and column headings in a worksheet using Excel and VBA methods.
Excel Methods: This tutorial provides two Excel methods that can be applied to show 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 show the row and column headings, in a single worksheet, in three steps.
VBA Methods: This tutorial shows the row and column headings by setting the ActiveWindow.DisplayHeadings to True. It shows four VBA methods that can be applied to show row and column headings in the worksheets where the row and column headings are hidden.
The first VBA method shows 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 shows the row and column headings. The third VBA method is similar to the second method, by activating a specific worksheet and then showing 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 show 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 show row and column headings, into the input box. The input box will appear when the macro is run.
The first VBA method shows 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 shows the row and column headings. The third VBA method is similar to the second method, by activating a specific worksheet and then showing 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 show 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 show row and column headings, into the input box. The input box will appear when the macro is run.
In all of the examples above it is assumed that the row and column headings in the worksheet, in which you want to show row and column headings, are hidden.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Hide row and column headings in a worksheet | How to hide row and column headings in a worksheet using Excel and VBA methods | |
Hide row and column headings in multiple worksheets | How to hide row and column headings in multiple worksheets using Excel and VBA methods | |
Show row and column headings in multiple worksheets | How to show row and column headings in multiple worksheets using Excel and VBA methods | |
Hide row and column headings in a workbook | How to hide row and column headings in a workbook using Excel and VBA methods | |
Show row and column headings in a workbook | How to show row and column headings in a workbook using Excel and VBA methods |