Auto Fit (Excel Shortcut)

Last Updated: January 10, 2024
puneet-gogia-excel-champs

- Written by Puneet

Latest Video Tutorial – 10 Excel Keyboard Shortcuts (Probably YOU are NOT Using)

In Excel, AutoFit feature is used to resize row height and cell width based on the size of the value in the cells.

As you know, Excel has default rows height and cells width and when the user enters any value whose length is more than the cell width, the value spills over the cells, and to resize the cells based on that value we can use AutoFit.

In the below image you can see the length of the values entered was more than the default size of the cells due to which the values spilled over the cells.

values-spilled-over

Keyboard Shortcut to Use AutoFit in the Excel

AutoFit Cells Width (Columns)

AltHOI

AutoFit Row Height (Rows)

AltHOA

Steps to use AutoFit Cells Width Using Keyboard Shortcut

  1. First, select the single cell or the whole column using the “Ctrl + Spacebar” keys.
    select-the-column
  2. Now, simply press “Alt → H → O → I” and the width of your cells will get expand based on the top largest cell value within the column.
    cells-after-autofit

Steps to use AutoFit Row height Using Keyboard Shortcut

Let’s assume you have unstructured data where in a column you have some values in wrap text and some are not due to which the row height of the data is not same and to make rows and column AutoFit, follow the below steps:

unstructured-data-in-the-cells
  1. First, select the column and expand the column width manually to a level where all the values can be covered.
    expand-the-column-width
  2. After that, simply press “Alt → H → O → A” and you will get the rows’ height adjusted.
    rows-height-adjusted-by-autofit

In the above case, if you use AutoFit cells shortcut to AutoFit the width of the cell, it will not work properly because AutoFit does not work on wrapped text cells.

There might be a possibility of having more larger value in any wrapped text cell, so it is advised to expand the column manually and then use the AutoFit row height shortcut.