To hide every other column in Excel for Microsoft 365 on Windows, select the column headers you want hidden while holding Ctrl, then choose Home > Format > Hide & Unhide > Hide Columns. For a large range, a short VBA macro can hide alternating columns automatically; hidden columns are still in the workbook and can be restored later.
What hiding columns does
Hiding a column changes what is displayed, not the data stored in the cells. If columns B, D, and F are hidden, their values remain available to formulas, charts, and other workbook features. For example, a total that refers to cells in a hidden column can still include those cells in its calculation. Hiding is useful for reducing visual clutter, making a report easier to scan, or temporarily removing detail from view.
It is not a way to protect confidential information. A recipient can unhide columns, inspect formulas, or access the underlying workbook data. If information must not be shared, remove it from the file or use appropriate access controls rather than relying on hidden columns.
Excel has 16,384 columns, from A through XFD. Hiding alternate columns across a very wide sheet by hand is tedious, so the right approach depends on how many columns you need to change and whether you will repeat the task.
Hide alternating columns by selecting their headers
For a small or moderate number of columns, select the headers for the columns to hide, then use the ribbon or the context menu. A column header is the letter at the top of the worksheet, such as B or D; selecting it applies the command to the whole column.
- Click the first column letter you want to hide. To hide B, D, F, and so on, start with B.
- Hold Ctrl and click each additional column letter you want to hide. Keep Ctrl held while making the selections so earlier choices remain selected. On a Mac, use Command instead of Ctrl for this selection method.
- Choose Home > Format > Hide & Unhide > Hide Columns. Alternatively, right-click one of the selected headers and choose Hide.
The visible columns will close up, so the letters may appear to skip: A, C, E, G. That is expected. Excel retains the hidden columns between them. If you want the opposite pattern, select A, C, E, and so on before hiding. Think about the starting column before you begin: “every other column” does not specify whether the first or second column in the range should disappear.
In Excel for Windows, Ctrl+0 is a keyboard shortcut for hiding selected columns on many installations. Shortcuts can be affected by Windows settings and keyboards, so use the ribbon path if it does not work. On Mac, Command+0 may hide selected columns, but the ribbon or context menu is the dependable alternative when a shortcut is intercepted or unavailable.
Choose the starting pattern deliberately
First decide which column should remain visible. If a table begins in A and you want to preserve A while hiding the next column, select B, D, F, and continue through the range. If you want to hide the first column of the range instead, begin with A and select A, C, E. This simple decision prevents a common mistake: hiding the labels or identifiers that readers need to interpret the remaining values.
For example, suppose a worksheet has a product name in A and monthly figures in B through G. Hiding every second column starting with B would conceal March, May, and July only if the months are laid out in that order and B represents March. Check the actual headers before hiding anything; alternate positions do not necessarily correspond to alternate categories if the table contains spacer columns or notes.
When you need a pattern across a long range, work in manageable sections and check the visible result. Excel does not add a special “every other column” command to the standard Hide menu. The ordinary command hides whichever columns you selected; the alternating pattern comes from your selection or a macro.
Use VBA for a large or repeatable range
If you need to hide alternating columns repeatedly, a macro can apply the pattern to a selected block. The example below hides the second, fourth, sixth, and subsequent alternating columns within the selected range. Select a continuous block of columns first—for example, A:Z—and the macro leaves the first selected column visible. It also works when a cell range within those columns is selected, because it uses the selection’s first and last columns.
Sub HideEveryOtherColumn()
Dim target As Range
Dim firstCol As Long
Dim lastCol As Long
Dim col As Long
If TypeName(Selection) <> "Range" Then Exit Sub
Set target = Selection
firstCol = target.Column
lastCol = target.Columns(target.Columns.Count).Column
For col = firstCol + 1 To lastCol Step 2
target.Worksheet.Columns(col).Hidden = True
Next col
End Sub
To use it in desktop Excel for Windows, select the range, press Alt+F11 to open the Visual Basic Editor, insert a standard module using Insert > Module, and paste in the code. Run the macro from the editor or through Excel’s macro controls. On Mac, the Visual Basic Editor is also available in desktop Excel, though the keyboard shortcut can differ; use the Tools or Developer controls if necessary. Excel for the web does not run VBA macros, so use manual selection there or open the workbook in desktop Excel.
The macro hides columns; it does not toggle them back to visible, and running it again will not restore them. Save a copy of the workbook before running any macro. VBA actions cannot be undone with Ctrl+Z. If you want the other alternating pattern, change the loop’s first value from firstCol + 1 to firstCol; that hides the first, third, fifth, and later alternating columns in the selection.
Unhide columns when you need them again
To restore a hidden column between two visible columns, select the visible column headers on both sides of it. For example, if B is hidden between A and C, select A and C, right-click either selected header, and choose Unhide. You can also use Home > Format > Hide & Unhide > Unhide Columns.
If several columns are hidden, select a wider range of headers around them before choosing Unhide Columns. To restore all columns on the sheet, click the Select All button at the top-left corner of the grid, where the row numbers and column letters meet, then choose Home > Format > Hide & Unhide > Unhide Columns. This can also reveal columns that were hidden for other reasons, so use it with care in a workbook where the layout is deliberate.
A small change in column width can look like a hidden column. If you see a very narrow divider rather than a skipped column letter, select the relevant headers and choose Home > Format > Column Width to set a readable width. You can also use Home > Format > AutoFit Column Width after selecting the columns.
Hide columns or group them?
Use Hide when you want selected columns out of view without adding controls to the sheet. Use grouping when readers should be able to expand and collapse a structured set of detail columns themselves. To group columns, select a contiguous range of column headers and choose Data > Group. Excel adds outline controls that can collapse or expand that group.
Grouping is not an automatic substitute for hiding every other column. It is designed for adjacent columns, such as a set of monthly detail figures beneath a yearly summary. Alternating selections such as B, D, and F are separate, noncontiguous columns; if you group detail, arrange it in a meaningful contiguous block where possible. Grouping can make a report easier to navigate, while hiding is simpler for a temporary view change.
Common problems and checks
- Only one column disappears: Check that you held Ctrl on Windows or Command on Mac while selecting each additional header. Without the modifier key, a new click replaces the previous selection.
- The wrong columns are hidden: Undo immediately with Ctrl+Z on Windows, or use the Undo control, then check which column should start the pattern. If a macro performed the change, Ctrl+Z will not reverse it; unhide the affected range instead.
- A column seems impossible to select: The sheet may be protected. Review the Review tab’s protection controls or ask the workbook owner for permission before changing the layout.
- The columns remain hidden after filtering: AutoFilter hides rows that do not match a filter; it does not hide alternating columns. Use column selection, the Hide command, or VBA for columns.
- The sheet looks different after sharing or printing: Hidden columns may also be omitted from the visible worksheet view and print output. Preview the sheet before printing, and remember that recipients can unhide the data.
Frequently Asked Questions
Can Excel hide every other column automatically?
Excel’s standard ribbon does not have a one-click command for that exact pattern. Select the alternating column headers and use Hide Columns, or run a VBA macro for a large or repeatable range in desktop Excel.
Can I hide every other column without a macro?
Yes. Click the first column header, hold Ctrl on Windows (Command on Mac), and click each additional header in the pattern. Then choose Home > Format > Hide & Unhide > Hide Columns. This is practical when the range is not too large.
Do formulas still use hidden columns?
Yes. Hiding a column does not delete its values or normally remove it from formula calculations. A formula can continue to refer to cells in hidden columns, and charts may also include data from them depending on the chart settings.
How do I unhide every column at once?
Click the Select All button at the top-left corner of the worksheet grid, then choose Home > Format > Hide & Unhide > Unhide Columns. This restores all hidden columns on that worksheet.
Does this work in Excel for the web?
You can select column headers and hide columns in Excel for the web, though the exact controls may vary with the web interface. VBA macros do not run in Excel for the web; open the workbook in desktop Excel to use the macro method.
Will hiding columns keep their contents private?
No. Hiding only changes the display. Anyone with access to the workbook may be able to unhide the columns or inspect their contents, so remove sensitive information before sharing the file.
Related
- Excel Goal Seek With Multiple Inputs: Use Solver
- Excel Goal Seek Precision: Accuracy and Limits
- Excel Goal Seek Tolerance: Set Precision and Check Results
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Apply Styles in a Word Document for Clear FormattingTo apply a style in Microsoft Word, click in a paragraph or select text, then choose a style…
- Excel Time Format for Milliseconds: Display and CalculateTo show milliseconds in Excel, select the time cells, press Ctrl+1, choose Number > Custom, and enter hh:mm:ss.000…
- Excel Geographic Heat Map Template: How to Make OneYes. In Excel for Microsoft 365 on Windows, make a geographic heat map with a table containing a…
- Google Sheets Habit Tracker: Build One That WorksA Google Sheets habit tracker is a spreadsheet for recording whether you completed habits on particular days; the…
- How to Remove All Formatting in Microsoft Word QuicklyTo remove formatting in Microsoft Word, select the text and choose Home > Clear All Formatting in the…
- How to Delete a Stubborn Page in Word Without Losing TextTo delete a stubborn page in Word, first turn on formatting marks with Ctrl+Shift+8 on Windows or Command+8…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.