Software

How to toggle Excel row and column headers


Excel displays heading cells for each column and row in every sheet. Those are the gray cells at the top of each column and to the left of each row. They help you navigate the sheet. However, you might want to inhibit the header cells, which is easy enough. Simply choose Options from the Tools menu, click the View tab, and then uncheck the Row & Column Headers option in the Windows section. In Excel 2007, this option is in the View group. Click Show/Hide and choose Headings.

If you find yourself switching back and forth a lot, use a macro to toggle the views. Launch the Visual Basic Editor by pressing Alt+F11. Choose Module from the Insert menu, enter the following sub procedure (macro), and return to the sheet:

Sub ToggleHeaders()
ActiveWindow.DisplayHeadings = _
   Not ActiveWindow.DisplayHeadings
End Sub

Running the macro really isn't fewer clicks than resetting the option though, so give the macro a shortcut key. To do so, choose Macro from the Tools menu and then select Macros. (In Excel 2007, click Macros in the View group and choose View Macros.) In the Macro dialog box, click the Options button. In the empty Shortcut key field (to the right of the Ctrl + text, enter t (for toggle). Any letter will do, but choose one that isn't already in use as a shortcut key. Click OK. Click Run to execute the macro. If the header cells are visible, the macro will hide them, and vice versa. To run the macro again, just press Ctrl + t.

About

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

1 comments
dr-dave
dr-dave

thanks!  works like a charm!!!!

Editor's Picks