Open In App

How to AutoFit in Excel? – Change the Column Width and Row Height

AutoFit is a feature in Excel that helps you to quickly adjust the row height or column width so that your data/text fits completely into the cell. Also, In AutoFit you don’t have to manually specify the row height and column width. It will Automatically figure out how much expansion is needed. to fit the text in the cell. 

How to AutoFit in Excel

Excel Autofit Basics

As you know, Excel has a certain row and column width by default. But in some cases, we might need to write something that can occupy more space, at that time we have to adjust the row or column width so that our text will not spill out from the cell and remain within the cell. 



We can do so with the help of the AUTOFIT feature in Excel.

Example of text Spill out from the cell:



We can set column width and row height manually as per our requirement by clicking on column width or row height in the Format option in the cells group on the Home tab.

When adjusting the size of cells in Excel, whether it’s done automatically or manually, it’s important to keep in mind certain limits regarding the maximum dimensions of columns and rows.

How to Use the Autofit in Excel?

As you have seen, In most of the cases Excel automatically adjusts the row height on writing more than one line in the same cell. In such cases, you won’t need to do any adjustments.

But sometimes you may have to deal with a dataset, where row height has already been fixed and needs adjustments, use AUTOFIT feature there.  

Method 1. How to AutoFit rows and columns via the Ribbon

Follow the below steps to use Autofit feature in Excel via the Ribbon:

Step 1: Select the column or columns that you want to change.

Step 2: On the Home tab, in the Cells group, click Format.

Step 3: Under Cell Size, click AutoFit Column Width to adjust column width. (To adjust row height, click on Autofit Row height)

See the changes (Content is adjusted in the column).

Note: We can also adjust the Row height to fit the content in the cell by clicking on Autofit Row Height

Method 2 – How to AutoFit Rows and Columns using Double-Click

To Autofit the rows and columns using a mouse follow the below steps:

For Columns:
Step 1:Hover the mouse on the right border of the column heading. A Double- Headed arrow will appear.

Step 2: Double-Click to Autofit the selected columns.

Method 3 – How to AutoFit rows and columns using Shortcut Keys

  • AutoFit Row Height: ALT > H > O > A
  • AutoFit Columne Width: ALT > H > O > I

How to use these keyboard shortcuts

To fit the cells using a keyboard follow the below steps:

Step 1: Press ‘Alt’

Step 2: Press ‘H’.

Step 3: Press ‘O’.

Autofit Alternatives in Excel

There are a couple of alternatives for Autofit in Excel. Some of them are described below:

Wrap Text

It will fit your text in that particular cell. It will increase the row height to fit the text but the column width will remain the same. To use this alternative follow the below steps:

Step 1: Select your cells to wrap.

Step 2: Click on Wrap Text on the Home tab in the Alignment group.

Wrap Text from Keyboard Shortcut:

  • Press ALT >- H >-W

Shrink to Fit

To shrink the contents of a cell so that they fit in the current column width follow the below steps:

Step 1: Select desired cells.

Step 2: Click on Format in the Cells group in the Home tab.

Step 3: Click on Format Cells. Below dialog box will appear.

Step 4: Click on ‘Shrink to fit’.

Step 6: Verify Changes.

The text size is shrunk to fit the column.

Excel AutoFit Not Working

Sometimes, You may face some issues while using Autofit feature in Excel when trying to automatically adjust the column width and row height, especially when the Wrap Feature is enabled. In such a case, you can find extra space below the last line of text, and the text might get cut off when printed.

You may try this solution to resolve this problem:

Benefits of Using AutoFit in Excel

  1. Efficient Formatting: You don’t have to manually adjust the column width and row height. It automatically resizes cells to fit the content saving you time and effort.
  2. Consistent Data Display: Autofit helps to maintain a consistent appearance throughout your worksheet.
  3. Readability and clarity: Autofit ensures that the Text in your cells remains visible without spilling over into adjacent cells.

How to Set Column Width Manually Using Ribbon

But sometimes, when we don’t know about the exact width of the column or the height of the row, then we use Autofit in Excel.

How to AutoFit in Excel – FAQs

What is Autofit in Excel?

Autofit in Excel is the feature that is used to adjust the row height or column width so that our text can fit in the cell completely( without spilling over to other cells.) 

You don’t have to manually specify the column width or Row height.  It will Automatically expand or contract to fit the current cell content.

What can be the reasons for not working with Autofit in Excel?

Although Autofit works well, but there might be some cases where Autofit could not give the right output,

  • When the cells are merged.
  • When you are using older versions of Excel.
  • When wrap text is applied to the cell.

Is it Possible to Autofit Multiple Columns at once in Excel?

 Yes, you can Autofit multiple columns simultaneously in Excel. Follow the below steps to do so:

  • Step 1: Select the columns you want to Autofit.
  • Step 2: Then, double-click the right boundary of any selected column header, and Excel will adjust the column widths of all selected columns to fit their contents.

How we can Autofit column width in Excel?

Follow the steps to Autofit Column Width in Excel:

  • Step 1: Select the Columns that you want to Autofit.
  • Step 2: Double Click the right boundary of the selected column header.
  • Step 3: Excel will automatically adjust the column width to fit the widest content in the Column.

How we can Autofit Row Height in Excel?

Follow the steps to Autofit Row height in Excel:

  • Step 1: Select the Row or Rows you want to Autofit.
  • Step 2: Right Click and choose “Row height“. 
  • Step 3: Without changing anything Click “OK” in the dialog box.

Article Tags :