All shortcuts

Autofit Column Width in Google Sheets

Windows

AltHOI

Mac

OptionHOI

Alt H O I — autofit column width — might be the most famous Alt sequence in Excel. Every analyst’s hands know it. Google Sheets has no equivalent shortcut: you have to grab the mouse and double-click a column boundary.

XLKeys makes Alt H O I work in Sheets. Select any cells, run the sequence, and every column in the selection snaps to fit its widest content.

Excel vs. Google Sheets vs. XLKeys

WhereShortcut
ExcelAltHOI
Google Sheets (native)No keyboard shortcut
Google Sheets + XLKeysAltHOI

In Google Sheets you normally double-click the column edge or right-click > Resize column — no native keyboard shortcut exists.

How to use it

  1. Select a cell in each column you want to resize (or select whole columns).
  2. Press Alt, release it, then type H, O, I.
  3. All selected columns resize to fit their contents.

Frequently asked questions

Related shortcuts

Make Google Sheets feel like Excel

Install XLKeys to use autofit column width and 150+ other Excel-style shortcuts, Alt-key sequences, formula auditing, Goal Seek, and Sensitivity Tables in Google Sheets.