Automatically Allow Columns and Rows to Fit the Text with Excel Autofit

There is a specific width for the columns and height for the rows in Excel by default.

Every time you enter something that gets more space than the current size, it will spill out.

Whenever this occurs, it would be best if you have the columns and rows adjusted so that the text will completely fit inside the cell.

You can do this by using the Excel AutoFit feature.

Our tutorial will show you how you can use the Excel Autofit feature in various ways.

We will also discuss some of Excel’s other features that you can use whenever you work with Excel’s text data.

What Excel AutoFit Does

AutoFit in Excel

Whenever you have something entered in an Excel cell, you may notice that it ends up spilling over every time the size of your data or text is more than the column’s size.

Excel has the AutoFit feature that lets you immediately adjust the column width or row height to completely fit the text without having to spill over to any other cell.

Aside from that, with AutoFit, you don’t need to have the row height or column width specified manually.

You wouldn’t have to adjust and drag the column width as well.

On its own, it can figure out how much it needs to contract or expand so it can fit the content of the existing cell.

  • Autofit Row Height: Here is a feature that allows the row height to adjust automatically to fit the cell’s text. It can be possible for you to have multiple rows autofit at once.
  • AutoFit Column Width: It is a feature that allows the column width to become automatically adjusted so it can fit the cell’s text. It can be possible to have text fit for more than one column at the same time. We will show this to you in the examples.

You will most of the time notice that the row height can automatically get adjusted in Excel whenever there is more than a single line entered in that cell.

Whenever this happens, you won’t have to change the row height.

However, it can be possible for you to have a dataset as a download or from a person wherein the row height is already fixed and would require some adjustments. I

n this case, you may use the feature ‘AutoFit Row Height.’

How You Can Use AutoFit in Excel to Adjust Columns and Rows to Fit Text)

Here is a list of the different ways you can use Excel’s Autofit Feature:

  1. Double-click on the mouse
  2. Use the Excel ribbon’s AutoFit option
  3. Use a keyboard shortcut

All of these methods can work well as you can select whichever would be best for you.

Most of the time, anyone can use the double-click method to be the highly convenient one.

The Use of the Double-Click on the Mouse to AutoFit Columns and Rows

Double Click to AutoFit in Excel

It can be possible for you to be with a dataset wherein the text ends up spilling to another column because it has a smaller width.

Here are ways you can use the mouse to autofit the width of the column:

  1. The cursor will change to an icon with a double-sided arrow.
  2. Allow yourself to have the left key of your trackpad or mouse double-clicked.
  3. Make your cursor get over to the column header’s right edge.

Once you complete this, you will see that the column width will automatically change to adjust every cell so that text will not overflow to the other cells.

Please note that we expanded the column width to modify the cell that has to be at the maximum width.

It can also be possible to have the double-click method used to adjust various columns simultaneously.

In case you have a dataset that has a couple of columns with text that needs autofitting, you can use these steps so you can use the mouse to autofit the column:

  1. Choose the columns that you want to autofit. For this example, you can select columns A and B.
  2. After choosing both of these columns, have the cursor placed on the column header’s right edge.
  3. When this happens, you will see the cursor change into an icon of a double-sided arrow.
  4. Have your trackpad or mouse’s left key double-clicked.

Once you do this, both of the columns that you chose will autofit.

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

Since I have already shown you how to fit text to the columns that people commonly require automatically, you can also do the same with the rows.

All you need to do is have the cursor placed on the chosen row’s bottom edge and then double-click your mouse.

The Use of the Excel Ribbon to AutoFit Columns and Rows

Excel Ribbon

You can also quickly have cells autofit in Excel with the use of the ribbon’s option.

In case you are with a dataset wherein you desire to autofit Column A, here are the steps on how to do this:

  1. Choose the column that you want to autofit.
  2. Click on the Home tab.
  3. Click on the option ‘Format’ in the cells group. In the drop-down, it will show the added options.
  4. Click on the option ‘Autofit Column Width.’

These steps can help you expand the column immediately to have the text in the cells appropriately adjusted.

You may also work on these steps if you want to autofit the row height.

Whenever you want to do this, you need to choose the rows that need autofitting and then select the option ‘Autofit Row Height.’

The Use of A Keyboard Shortcut to AutoFit Columns and Rows

Keyboard Shortcut

Whenever you don’t feel like the mouse is good for you that you want to use keyboard shortcuts instead, check out this method.

Here is a list of the keyboard shortcuts that can help in autofitting the cells:

Autofill row height by pressing the following:

ALT + H + O + A

Click on the following for Autofill column width:

ALT + H + O + I

Have these keyboard shortcuts used by doing the following:

  1. Choose the column or row that you desire to autofit.
  2. With the keys, use the keyboard shortcut in succession. For example, whenever you use the shortcut ALT + H + O + I, have the ALT key, H key, O key, and I key pressed in succession.

Possible Reasons Why AutoFit Does Not Work

Most of the time, Autofit can work well. However, there are times when you discover that this feature is not working.

There may be a lot of reasons why it doesn’t work. There may be times when it works and times when it doesn’t.

Here are some of the possible reasons why the autofit doesn’t work on your Excel:

You applied Wrap Text


Wrap Text

If you had text wrap applied to a cell and you are trying to autofit the row, you may discover that at the top or bottom of the row are some additional spaces.

These may not be space characters, but a space that is there for no apparent reason. There are times when changing the width of the column can make it disappear.

There will always be the option to have the row resized manually or have the row-height option and right-click used to specify the height value.

The other place where autofit doesn’t work is when you are trying to have the column autofitted as you apply the wrap text to the cell.

It may not be much of an autofit that doesn’t work as it is more related to the design.

Excel will not know which column width it needs to use whenever you autofit as you applied the wrap text.

The meaning of wrap text is that you can have any text wrapped to stay inside the cell. Whenever this happens, trying to have the column autofitted will not do anything.

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

Presence of Merged Cells

Merged Cells

There are times when Autofit does not work whenever your Excel spreadsheet has merged cells.

It often happens whenever you use Excel’s old versions that are 2003 and older.

Microsoft was also able to acknowledge this issue. Whenever this happens, your only workaround is to have the column width and row height set manually.

Use of Wrap Text

Wrapped Text in a Cell

If your cell has so much text, having the column autofitted can make it expand and become too big.

Since this may not be great in presenting information, it would be better to have a narrower column and a bigger row.

Every time you have wrap text applied to the cell, it will make the cell’s content stay inside it.

It will let you select your desired column width and have the row height autofitted so you can match the row height or column width.

Have the row height adjusted to your desired size, and then use the auto-fit to adjust the column width. Just make sure that you can visibly see the cell content inside the cell.

Shrink to Fit

You can also use the option called Shrink to Fit.

It is not the same as Autofit that adjusts the row height or column width.

Whenever you have ‘Shrink to Fit’ applied on any cell, it can simply make the cell font change to fit everything in that column width.

For example, whenever there is text in a cell that spills to the other cells, apply Shrink to Fit on that cell to make the cell’s font smaller. It will allow the cell content to fit in the current width of the column.

Here are steps on how you can apply the format ‘Shrink to Fit’ to a cell:

  1. Choose the cells that you want to ‘Shrink to Fit.’
  2. Hold on the Control key and then click on the 1 key (Once you do this, it will open the dialog box of Format Cells)
  3. Click on the tab ‘Alignment.’
  4. Check the option ‘Shrink to Fit’ in the ‘Text Control’ options.

Take note that the Shrink to Text never works for cells that apply the ‘Wrap Text.’

Alternatives to Excel’s AutoFit Option

Even if autofit may be what you want to do most of the time, other available options can assist you in present your data in a much better way.

These primarily apply in cases where you can’t use autofit.

These are just some of the recommended ways you can AutoFit columns or rows used in Excel.

Also covered here are some of the probable reasons why AutoFit may not be applied to your system, including its other alternatives in Excel.

I do hope that this tutorial has been helpful for you!