Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Hiding and Unhiding Columns.

Hiding and Unhiding Columns

by Allen Wyatt
(last updated September 29, 2020)


Excel allows you to easily hide columns in your worksheet. Once a column is hidden, it will not be shown on the display or printed when you print the worksheet. The column is not deleted; its width is simply reduced to 0. To hide a column, follow these steps:

  1. Select any cell in the column (or columns) you want to hide.
  2. Make sure the Home tab of the ribbon is displayed.
  3. Click the Format tool in the Cells group. Excel displays a series of options.
  4. Click Hide & Unhide and then click Hide Columns.

You can also hide columns by selecting those you want to hide, right-clicking on the selected columns, and choosing Hide from the resulting Context menu.

The columns disappear from the display. Notice, however, that the other columns do not change; they still retain the same column labels. Excel does, however, leave a thick bar in the column header area to indicate where the hidden columns would normally appear.

To later unhide the columns, follow these steps:

  1. Select the columns on both sides of those that are hidden.
  2. Make sure the Home tab of the ribbon is displayed.
  3. Click the Format tool in the Cells group. Excel displays a series of options.
  4. Click Hide & Unhide and then click Unhide Columns.

You can also unhide columns by selecting the columns on both sides of those you want to unhide, right-clicking on the selected columns, and choosing Unhide from the resulting Context menu.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6864) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Hiding and Unhiding Columns.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Transposing Two Words

A common editing task is to transpose two adjacent words, so that their order is changed. While the task is common, there ...

Discover More

Turning Off a Startup Sound

If you hear a sound when you start Word, it is because of some settings within Windows itself. You can use the Control ...

Discover More

Naming Tabs for Weeks

Need to set up a workbook that includes a worksheet for each week of the year? Here's a couple of quick macros that can ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Unhiding Columns that are Persistently Hidden

If you were trying to format a worksheet and nothing you did could make the first two columns appear, would you be ...

Discover More

Hiding Columns Not within a Date Range

Want to automatically hide some columns that don't meet a date criterion that you set? You can't do it automatically, but ...

Discover More

Widening a Column to a Particular Cell's Width

Do you want to set a column's width based on whatever is in the currently selected cell? There are actually a number of ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two less than 8?

2021-09-04 15:57:49


What is the downside of changing column width to 0.1 to hide it? Existence of hidden column by skip in the headings - e.g., AC when B is hidden.

2020-09-29 14:53:43


Instead of using a macro to hide predefined columns for printing, why not set up custom views ? Doesn’t require VBA, file format stays xlsx and is easier to maintain (also more versatile as it also supports filtering and print area settings)

2020-09-02 13:50:49

J. Woolley

You might want to use my new FindAndUnhide macro in the M_Text module of My Excel Toolbox:

2020-08-21 10:57:23

J. Woolley

This might be a bit awkward, but after using Ctrl+F to find the hidden cell, press Esc to close the Find dialog then Ctrl+Shift+9 or Ctrl+( to unhide the row. To re-hide the row, press Ctrl+9. To find the next, press Ctrl+F+Enter.
To hide/unhide a column, use Ctrl+0/Ctrl+Shift+0.

2020-08-19 06:23:47


I have a large worksheet and use the 'collapse row' function to make it look less busy. Problem is if someone searches for data that is contained within the collapsed rows, the normal Ctrl-F search will find it but just underlines the cell above which is not easy to see. Is there a way of a simple search opening the collpased rows to show the cell containing the searched date?

2017-03-13 18:08:33

Tim J

Why bother with the ribbon, except for unhiding columns?
Surely :
CTRL+9 hide selected row
CTRL+SHIFT+( unhide column in selection

CTRL+0 (zero) hide selected column

However, I have never gotten this to work. Is there a bug?
CTRL+SHIFT+) unhide column in selection

(I also use outlines on sheets I want to hide/unhide rows and columns frequently)

2016-11-29 11:04:11

Gary Lundblad

I like your hiding macro Graham; however; how hard would it be to have the trigger be a value rather than a comment? If the trigger is a value it can be dynamic. How would you change the code if it were say the value "True," in the first column, or even "Hide," if that's easier, rather than a cell comment.

Thank you Graham!


2016-11-27 02:47:04


I find it easy to "GROUP" columns or rows (Data-ribbon, outline - Group) that I frequently should hide or unhide. You then get the + and -buttons on the side bar or top bar to expand or collapse grouped columns and rows. You also can "ungroup" rows and columns you do not want to keep into it. Adjoining columns and rows will be "grouped" together. If you want to collapse or expand them separately then it is best to insert a very narrow column or row in between.

Good luck.

2016-11-26 06:27:12


If you regularly want to hide and unhide a pre-defined set of columns then the macro below could be used. For example I use this to hide some columns during printing.

All that you need to do is add a Comment in Row 1 for any column that you wish to hide. The comment should start with the characters HID, upper or lower case.

NOTE - When creating a new cell comment some versions of Excel start the comment with the user's name. This needs to be removed.

By use of the Static definition the macro toggles between hidden and unhidden.


Option Explicit

Static Sub Hiding()

' Hiding Macro
' Toggles a pre-defined selection of columns as hidden or unhidden
' Columns defined by cells in FIRST row having a COMMENT starting with the
' letters "HID", that is any word such as "Hide", "Hidden", "Hiding", etc.
' Checks if Worksheet is initially Protected, asks for password if needed
' but reprotects WITHOUT password.

Dim active_column, actcell, hidden, protected

Application.ScreenUpdating = False ' Runs faster & stops screen flicker
Application.Calculation = xlManual
ActiveWorkbook.PrecisionAsDisplayed = False

If ActiveSheet.ProtectContents Then
protected = "Yes"
ActiveSheet.Unprotect ' Needed to allow hiding/unhiding to occur
End If

Set actcell = ActiveCell ' Stores location of "active" cell

hidden = hidden + 1
' initial value of hidden is zero if "first use" or
' "last used" value, due to "Static" statement in Sub title

If hidden > 2 Then hidden = 1

If hidden = 1 Then ' Change to "all" columns visible
Selection.EntireColumn.hidden = False
Else ' Change to "selected" columns visible
active_column = ActiveCell.Column 'Starts search in last column currently in use.
Do While active_column > 0
If UCase(Left(Cells(1, active_column).NoteText, 3)) = "HID" Then
' Any cell in top row with COMMENT starting with
' Hide, Hidden, Hiding, etc. Upper or lower case.
Cells(1, active_column).Select
Selection.EntireColumn.hidden = True
End If
active_column = active_column - 1
End If

If protected = "Yes" Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True ' Re-establishes protection, without password
End If

actcell.Select ' Re-establishes active cell position

Application.ScreenUpdating = True

Application.Calculation = xlAutomatic
ActiveWorkbook.PrecisionAsDisplayed = False
Application.ScreenUpdating = True 'Resets screen updating

End Sub

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.