Sizing Columns and Rows Using the Keyboard

Written by Allen Wyatt (last updated January 7, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021

Andy hates to use the mouse any more than he needs to, as he finds it much more productive when he relies only on keyboard shortcuts. He wonders if there is a keyboard shortcut for sizing columns or rows in a worksheet.

If you are using the mouse, there are quite a few ways you can adjust row height and column width. Andy, however, wants to use only the keyboard, which involves displaying the Row Height dialog box (to set the row height) or the Column Width dialog box (to set column width). There are actually three approaches you can use to display these dialog boxes relying solely on the keyboard.

Using the Ribbon Commands

The first method is to depend on the tool-access keyboard method built into Excel. You can see this spring into action if you simply press the Alt key. Note that when you do, Excel places small letters near each of the areas of the ribbon. (See Figure 1.)

Figure 1. The keyboard shortcuts for accessing the ribbon areas.

At this point you can release the Alt key and just start pressing whatever keys will get you to the commands you want to use. For the commands to size columns and rows, then, the entire sequence to get to the right area of the ribbon is Alt, H, O. You can then see what keys you can press to display the desired dialog boxes. (See Figure 2.)

Figure 2. Keyboard shortcuts for formatting cells.

You can, at this point, press whatever key that will accomplish what you want. So, the full sequence of keys for sizing columns and rows are as follow:

  • Set column width: Alt, H, O, W
  • Autofit columns: Alt, H, O, I
  • Set row height: Alt, H, O, H
  • Autofit rows: Alt, H, O, A

Using the Legacy Shortcut Keys

Those who have been using Excel for some time know that you can often use the shortcut keys that worked in earlier versions of the program. You can initiate this approach by pressing Alt+O and Excel displays the Office Access Key dialog box. (See Figure 3.)

Figure 3. The Office Access Key dialog box.

At this point you can press C and then W to display the Column Width dialog box or press R and then E to display the Row Height dialog box.

Using the Context Menu

A third way to use the keyboard to set the row height and column width is to use the keyboard to access the Context menu. Here's how you would get to the Row Height dialog box:

  1. Press Shift+Spacebar. Excel selects the entire row.
  2. Press the Context key on the keyboard. (This key is just to the right of the Win key at the right side of the Spacebar.) Excel displays the Context menu. In some versions of Excel you can also press Shift+F10 to display the Context menu.
  3. Press R.

Getting to the Column Width dialog box is just as easy:

  1. Press Ctrl+Spacebar. Excel selects the entire column.
  2. Press the Context key on the keyboard. Excel displays the Context menu.
  3. Press W (Excel 2013 and later versions) or press C twice (Excel 2007 and Excel 2010).

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (4635) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Saving Money on Printing Labels

Labels can be expensive, and a little common sense will help you waste less money as you try to get your labels to appear ...

Discover More

Adding Drop Shadows

Want your shapes to really "pop" off the page? Add a drop shadow to them, as described in this tip.

Discover More

Emoticons in Word

Like to add a smiley or two to your writing? Word makes it easy through creative use of the AutoCorrect feature.

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Hiding Columns Not within a Date Range

Want to automatically hide some columns that don't meet a date criterion that you set? You can't do it automatically, but ...

Discover More

Widening Multiple Columns Proportionally

It is easy to adjust the width of columns in Excel. It is much harder to adjust the width of a range of columns ...

Discover More

Unhiding Columns that are Persistently Hidden

If you were trying to format a worksheet and nothing you did could make the first two columns appear, would you be ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.