Excel AUTOFIT: Make Rows/Columns Fit the Text Automatically

Excel AUTOFIT can make rows or columns fit the text automatically.

As default, there is a specific column width and row height in Excel that spills out whenever you enter something that occupies space more than its current size, as you can see below.

For these cases, you can have the columns and rows adjusted to fit within the cell for the text to be entirely inside it. 

You can do this using Excel’s Autofit feature.

In our tutorial, we will show you how you can use Excel Autofit in various ways.

We will also cover some of the Excel features you can use whenever you work with Excel’s text data.

What is Excel AutoFit?

Every time you enter something in an Excel cell, you will notice that it appears to spill whenever the data or text has a bigger size than the column.

Excel has the Autofit feature that lets you quickly adjust the width of a column or the height of a row so it can completely fit the text without making it spill over to the other cells.

Aside from that, AutoFit wouldn’t require you to specify the row height or column width manually.

It also won’t ask you to adjust and drag the column width manually.

Since it performs automatically, it can figure out how much you need to contract or expand so it can fit the existing content of the cell.

  • Autofit Row Height: With this feature, you can automatically adjust the row’s height to fit the cell’s text. It can be possible for you to have multiple rows autofitted at once.
  • AutoFit Column Width: Here is a feature that allows the automatic adjustment of the column width to fit the text in the cell. Here, you can have the text for different columns fit at once.

Most of the time, you will notice that Excel can automatically adjust the row height every time more than a single line gets entered in the same cell.

For these cases, you don’t have to change the size of the row.

However, there are times when you could get a dataset as a download or from someone, wherein the row height already got fixed but needs adjustment.

For this case, we recommend that you use the feature ‘AutoFit Row Height.’

How you can use AutoFit to Adjust Columns and Rows to Fit the Text in Excel

Here are several ways you can use Excel’s AutoFit:

  1. Use the Excel Ribbon’s AutoFit option
  2. Make use a keyboard shortcut
  3. Use the double-click method with the mouse 

These methods can work well, so you can select whichever would be best for you to use.

Most of the time, we use the double-click method with the mouse, as this may be the most convenient for anyone.

Utilize the Excel Ribbon’s AutoFit option

Allow the Excel cells to get autofitted quickly with the option AutoFit in the ribbon.

Assume that you have this data set and you want to have Column A autofitted:

Here are the steps on how you can do this:

  1. Choose the column that you want to autofit.
  2. Click on the Home tab                                                                                                                                                                                                                             
  3. Check out the Cells group and then click on the option ‘Format.’ The drop-down will show the added options.
  4. Click on the option ‘Autofit Column Width.’                                                                                                                                                                      

With these steps, you can immediately make the column expand to have the text in the cells appropriately adjusted.

These are the exact steps that you can use to autofit the row height. Do this by choosing the rows that you want to autofit and selecting the option ‘Autofit Row Height.’

Have a Keyboard Shortcut Used

If you don’t like to use the mouse and feel better about using a keyboard shortcut instead, this is the best method.

These are the keyboard shortcuts that you can use to autofit the cells:

To Autofill row height:

ALT + H + O + A

To Autofill column width:

ALT + H + O + I

Here is how you can use the keyboard shortcuts:

  1. Choose the column or row that you would like to autofit.
  2. Type this keyboard shortcut in succession. If you want to use the ALT + H + O + I shortcut, first press ALT, then tap on the H key, and so on.

Use the Double-Click Method with the Mouse

Assume that Suppose you have a dataset shown below where the text spills to the other column as the column width is smaller.

Here are the ways on how you can use the mouse to autofit a column:

  1. Make the cursor hover at the column header’s right edge.
  2. Here, you will see the cursor change into a double-sided icon of arrows. 

Double-click on your trackpad or the left key of your mouse, and you’re done!

You will see that the width of the column automatically changes to adjust to every cell so that the text will not overflow to the other cells.

Take note that the width of the column gets expanded so you can have the cell adjusted to the maximum width.

If you want multiple columns adjusted at the same time, you can use the double-click method used.

Pretend that you have this dataset that has two columns with text that you need to autofit.

If you want to use your mouse to autofit, here are the steps on how you can do this:

  1. Choose all of the columns that you need to autofit. Here, it will be columns A and B.
  2. Once you choose both of these columns, put the cursor at the column header’s right edge.
  3. Here, you will see the cursor change into an icon of a double-sided arrow.   
  4. Once you see this, double-click on the trackpad or the left key of your mouse.

Once you complete this, both of the columns that you chose will be autofitted as shown here:

Take note that if you want this to work, you have to choose the whole columns and not just the worksheet’s cells.

Since you have now seen an example of how to fit text to columns automatically, that is what you would commonly need.

You can do the same thing with the rows.

What you need to do is to place the cursor at the bottom part of the chosen row.

After that, press double-click.

Possible Solutions If AutoFit Doesn’t Work

Even if Autofit may work well most of the time, there may be instances when it doesn’t work correctly.

Whenever it is not working well, there could be so many reasons for this.

Here are the possible reasons why AutoFit does not work correctly on your Excel:

Wrap Text is Applied

Once you apply text wrap to a cell and attempt to try autofitting the row, you may discover that the top or bottom of the row has additional spaces.

These are not space characters, but space that is there for no apparent reason.

It can sometimes go away when you change the column width.

You can always have the option to resize the row manually by using the row-height option or right-click to specify the height value of the row.

Whenever you had wrap text applied to a cell and attempt to autofit the column, autofit will not work.

Because of the design and application of the wrap text, Excel is no longer aware of the column width.

So, it needs to use whenever you autofit.

When you do wrap text, you can have any text wrapped so that it would stay inside the cell.

For this case, attempting to autofit the column may not do anything.

However, you can work on manually adjusting the width of the column.

Presence of merged cells

There are times when Autofit doesn’t work whenever your Excel spreadsheet has merged cells.

This issue often happens whenever you use old Excel versions that are from versions earlier than 2003.

Microsoft was able to acknowledge this issue in the past.

If this becomes your problem, the only workaround for it is to have the column width or row height set manually.

Alternatives to Excel’s AutoFit Option

Even if you may mostly want to use autofit, there are other options that you can use which can help in presenting your information in a better way.

It would be best to use these, especially when autofit doesn’t appear to be the best option.

Shrink to Fit

Shrink to Fit is not like Autofit that adjusts the row height or column width.

Whenever you have ‘Shrink to Fit’ applied on any cell, it will just change the cell’s font to make everything fit in the existing column width.

For example, whenever the cell has text that spills to the other cell, apply the option Shrink to Fit on the cell, and it will make the cell font smaller so that the cell content will fit in the columns existing width.

With these steps, you can have the ‘Shrink to Fit’ format applied to a cell:

  1. Choose the cells where you want ‘Shrink to Fit’ to apply.
  2. Hold on to the CTRL key and then press the 1 key to open the dialog box Format Cells.
  3. Click on the tab’ Alignment.’
  4. Check the option ‘Shrink to Fit.’ You will see this in the options’ Text Control.’

Take note that the option Shrink to Text wouldn’t work for the cells where you applied ‘Wrap Text.’

Wrap Text

You may work on a cell that has so much text. When you autofit the column, it would expand it and make it appear big.

However, doing this may not be significant in presenting your data.

Thus, it would be more sensible to have a narrower column and a larger row.

Once wrap text gets applied to a cell, the cell’s content will stay in the cell.

It will let you select your desired column width.

You can have the height of the row autofitted to match the width of the column and vice-versa.

Adjust the row’s height to what you desire so you can have auto-fit used to change the width of the column.

It will help you make sure that all of the text will be visible in the cell.

These are the ways you can use Excel Autofit for the columns and rows.

We also discussed the possible reasons why autofit won’t work on your system, including some Excel alternatives.

We hope that this tutorial has helped you a lot!

Become Knowledgeable in Using Excel AUTOFIT to Make Rows/Columns Fit the Text Automatically with ExcelMaster

Make yourself an Excel expert with us!

Allow yourself to become aware of how you can use Excel AUTOFIT so you can make columns or rows automatically fit the text with ExcelMaster NOW!