Autofit Excel Column Widths using the Keyboard

Excel Shortcuts with Launch ExcelIn the previous post we discussed how Excel provides a neat way to autofit the width of a column using either the mouse double-click trick or using the built-in Excel menus.

In this post I will show you how to use a keyboard shortcut to accomplish the same task. If you want to learn more keyboard shortcuts you can download my free PDF with over 100 popular Excel keyboard shortcuts by clicking here.

What happens when your Excel Cell Content is too Wide to Fit in the Column?

Here is the scenario. You have a table of contacts that lists names, e-mails and birthdays. You have either imported this list from your e-mail program or perhaps just typed the list into Excel. But as it stands there are two problems:

Autofit Keyboard 1 - Problems

The list of contacts in the screenshot above has two problems
(1) we can’t read all the text, (2) we can’t see any of the dates

  • Problem 1: You can’t read the values in columns “Company” and “Email” as they are cut off by the values in the cells on their right.
  • Problem 2: You can’t see any of the date values in the birthday column because that column is not wide enough – instead all you see is a row of #########

In the previous post we looked at the mouse double-click trick, where you select the columns you want to resize then double click on a column border to automatically resize the columns to fit the widest contents of that column. Then we looked at the autofit column width feature, accessed via clicking on the built in menus.

Now we are now going to use keyboard shortcuts.

Keyboard shortcuts to autofit column width
(Excel 2007 & 2010)

As in the previous post we will use the built in menus and use the autofit column width feature, this time using keyboard shortcuts to access Excel’s cool autofit feature.

First select the cells you want to autofit. Here we don’t want Excel to resize column B to fit the text in row 2 and row 3, because we only want the column to be just wide enough for the first names in our contact list. So we first select the current region of cell B5 by pressing (Control + Shift + 8).

Next type the keyboard shortcut ALT + H + O + I to automatically resize the columns. If you want to learn more keyboard shortcuts I recommend you download my free PDF with over 100 Excel keyboard shortcuts by clicking here.

Autofit Keyboard 2 - Alt H O I

Autofit columns using keyboard shortcuts in Excel 2007 & 2010

Step by step instructions:

  • Select cell B5
  • Expand the selection to the current region (using Ctrl + Shift + 8)
  • Type Alt + H to select the Home tab on the Excel ribbon
  • Type O to select the Format menu in the Cells sub-area
  • Type I to select “autofit column width”

The keyboard shortcut ALT + H + O + I is my favorite method for automatically resizing column widths. I find this method is most useful when I am already using the keyboard to enter data, and don’t want to move my hand to the mouse.

Why use keyboard shortcuts in Excel?

The good thing about memorising this keyboard shortcut is that you don’t need to hunt for each menu item, as these might look different on different computers or if you have resized the Excel window they might not even appear where you expect. Whereas the keyboard combination is fixed and does not depend on who’s computer you use (as long as you have a standard keyboard layout!) or whether you have a resized window.

To illustrate this, have a look at the screenshot below. The window has been reduced in size, and the Format Cells button is not visible. You need to click on the “Cells” dropdown first, then this will show you the Format button. In fullscreen mode, Excel normally displays the Format button so that it is clickable in the Cells sub-area, rather than being hidden in a dropdown. If you use the ALT + H + O + I shortcut then you won’t need to go hunting for the Format cells button.

Autofit Keyboard 3 - Where is the format cells button.

Screenshot showing that Format Cells button is hidden (normally visible on the Home ribbon when Excel is full screen)

Keyboard shortcuts to autofit column width
(Excel 2003)

For those of you who use Excel 2003 or earlier, the process is similar but the keys are different. You use ALT + O + C + A.

  • Select cell B5
  • Expand the selection to the current region (using Ctrl + Shift + 8)
  • Type Alt + O to select the Format menu
  • Type C to select Column
  • Type A to select Autofit

Check out our free Excel Shortcuts PDF

If you want our popular reference guide with over 100 Handy Excel Keyboard Shortcuts, please check out our Excel Shortcuts PDF page

Read More: Resize & autofit column widths in Excel

Click on one of the following post links to read more on this topic.


Victor Chan
Hi I'm Victor. I started Launch Excel to help you use Excel and VBA faster. Thousands of people have learned new skills and increased their effectiveness at work with our help. You can do it too! Also I've personally used Excel lots since 2002. I use it mainly in accounting and finance but I also have a Masters degree in Engineering from Cambridge University. I hope you enjoy the site and tutorials!
Join over 9,000 subscribers


Recommended Posts
Contact Us

Please send us an email and we'll get back to you, asap.

Not readable? Change text.