Autofit Excel Column Widths using the Keyboard

 In Excel Tips

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.

Click here to download your free Excel shortcuts PDF

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.

Click here to download your free PDF with over 100 Excel keyboard shortcuts

Advantages of using 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
Victor has been using Excel intensively since 2002. He is a Chartered Accountant (Fellow of the ICAEW) and has an MEng in Manufacturing Engineering from the University of Cambridge. He is on a mission to help you learn how to use Excel better.
Join over 9,000 subscribers

GET BETTER AT EXCEL

Recommended Posts
Showing 15 comments
  • Forex trading systems
    Reply

    It took me time to read all the tips, but I clearly loved the post. It proved to be very helpful to me and I’m certain to all of your readers!

  • Seo Toronto
    Reply

    Thanks for that awesome posting. It saved MUCH time 🙂

    • Launch Excel Tutor
      Reply

      I’m glad you liked it, hope you come back soon for more Excel tips!

  • link
    Reply

    where can I sub to your feed?

  • Carolina Schuh
    Reply

    I think this is a real great article.Really looking forward to read more. Really Cool.

  • Samara Turley
    Reply

    Major thanks for the blog article. Really thank you! Cool.

  • Jillian Meiners
    Reply

    Thank you for your blog post.Thanks Again. Will read on…

  • Bianca
    Reply

    Hey incredible blog layout! You make blogging look easy. The overall look of your website is magnificent, as well as the content. Thanks for your article about automatically resizing Excel column widths with the keyboard. Hope to see more like it.

  • Trina
    Reply

    Pretty nice post. I just stumbled upon your blog and wished to say that I have truly enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again very soon!

  • Janice
    Reply

    Thanks for your help…love it!

pingbacks / trackbacks
  • […] to use the mouse to fit the width of a column to the widest contents of that column, and how to use keyboard shortcuts to do the same thing. Now for this question: how can I change a column width precisely? And how can […]

  • […] Autofit column widths in Excel using the keyboard […]

Leave a Comment

Contact Us

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

Not readable? Change text.

Start typing and press Enter to search