Skip to content

Autofit All Rows and Columns at Once

Have you ever been faced with the task of trying to get all of the row heights correct and the column widths just right?

You’re stuck with a spreadsheet with all this data, but many of the rows and columns are just not sized right.

 

Of course, you can adjust one row or column at a time by clicking on the right side of the column heading and dragging.

 

But there is a better way. You can autofit (adjust to the perfect size) all of the row heights using two simple keyboard shortcuts. You can also do the same thing with the column widths.

Let’s see how you do it!

Start by Selecting All the Cells

The first thing you want to do is select all of the cells in your worksheet. You can easily do this by clicking on the small triangle icon near the top-left corner of the spreadsheet.

 

However, there is a keyboard shortcut you can use instead.

CTRL + a

With any cell selected, use CTRL + a, and every cell in the worksheet may become selected. If only a handful of cells are selected, use the shortcut again, and every cell with then become selected.

The reason why all cells may not become selected the first time is fairly simple. Excel will first attempt to highlight all cells containing data that are close to the starting selected cell. If it finds them, it will highlight only those cells to begin with. If there are none, it will go ahead and select all cells in the worksheet.

Autofit All the Rows

With all the cells selected, all that’s left is to use one more keyboard shortcut.

ALT → H → O → A

These are not keys that you all press at the same time. Rather, you start by clicking the ALT key and then click HO, and then A. Once you use this shortcut, all the rows will re-size to fit the data perfectly.

Select All the Cells One More Time

With the rows sized correctly, you can move on to work on the column widths.

Once again, start by selecting all the cells in the worksheet. Select any cell and then use the keyboard shortcut CTRL + a. Use the shortcut again if necessary.

Autofit All the Columns

With all the cells selected, you only have one more shortcut to use.

ALT → H → O → I

Just like before, these are not keys that you all press at the same time. You press them in order. Start by clicking the ALT key and then click HO, and then I. All the columns are then re-sized to fit the data perfectly.

 

And that is how you can quickly adjust the row heights and column widths to fit your data to a T.

This Post Has 2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top