How to Hide Columns in Google Sheets

- Written by Puneet

Let’s say you are preparing a Google Sheets report for a meeting. Your sheet has several columns, but not all are needed for the presentation.

You can hide the columns with extra details to make the sheet easier to read. This way, others see only the most important data. After the meeting, you can unhide the columns if needed.

There are multiple ways to hide columns in Google Sheets. You can hide a single and multiple columns in one go. That’s why, in this tutorial, I will share each method in detail.

Hide a Single Columns in Google Sheets (Steps)

Below are the detailed steps to hide a single column in Google Sheets:

  1. First, you need to select the column that you want to hide. To do this, you can click on the header of the column. If you’re going to hide column C, click on the column’s header to select it.
  2. After that, right-click on it to open the right-click menu.
  3. Now, in the right-click menu, in the middle, there’s an option called “Hide Column,” which you need to click to hide the column.

When you click the option, it will instantly hide the column. And when a column is hidden, you can see two arrows in between. See in the snapshot below; column C is hidden.

Hide Multiple Columns in Google Sheets (Continues)

Now, let’s see if you want to hide multiple continuous columns. For example, if you want to hide columns B, C, and D in one go. In that case, you need to select all these columns as you selected the single column in the above method.

When you select these multiple columns from B-D and right-click on them, you will get the option in the right-click menu “Hide columns B-D”. And when you click on this option, it will hide all the 3 columns (B, C, & D) in one go.

You can use a quick trick to save time when selecting multiple columns. Let’s say your first column is B, click on the header of the B column to select it, and then press and hold the Shift key and click on the column header of D column. This will select all the 3 columns from B to D, including C.

Hide Multiple Columns in Google Sheets (Non-Continues)

And if you want to hide noncontinuous columns, they are not in a sequence. In this case, you need to select each of these columns one by one. You need to click on the header of each column one by one to select it.

Once you select the columns, you can right-click the “Hide Columns” option to hide them.

Keyboard Shortcut to Hide Columns

There is also a keyboard shortcut that you can use to hide one and multiple columns in Google Sheets. All you need to do is select the column or multiple columns that you want to hide and then press the following shortcut:

  • Ctrl + Alt + 0
  • Command + Option + 0

Use Google App Script to Hide Columns in One Go

We have a Google App Script code that can help you hide multiple columns in one go. When you run this code, it checks whether the columns you specified are hidden. If columns are not hidden, it will hide them; if they are hidden, it will unhide them.

function HideUnhideColumns() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('myfile'); // Change 'Sheet1' to your sheet name
  var columnsToToggle = [2, 4, 6]; // Column numbers to toggle (B, D, F)
  
  columnsToToggle.forEach(function(column) {
    var range = sheet.getRange(1, column, 1, 1);
    if (range.getWidth() === 0) {
      sheet.showColumns(column);
    } else {
      sheet.hideColumns(column);
    }
  });
}

If you want to change the column number in the code, you can edit it from the “columnsToToggle” and from the “getSheetbyName” you can change the sheet name.