# How to AutoFit in Excel (7 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

While using Excel, itâ€™s a very common task to use AutoFit option for rows and columns. So, Iâ€™ll show in this article how to autofit text in Excel with 7 easy methods. Please have a sharp look at the screenshots and follow the steps accordingly.

## 1. Double Clicking the Cell Extension Bar to AutoFit in Excel

Letâ€™s get introduced to our workbook first. In this datasheet, I have used 3 columns and 5 rows to represent some kinds of chocolateâ€™s price and quantity. As the text size of the product is long, thatâ€™s why the full name is not visible in the box. Now Iâ€™ll show how to fit it with a double click.

Steps for Column:

âž¤ Point your mouse to the Extension Border situated between the cellsâ€™ column headings.Â  Letâ€™s say, Iâ€™ll expand Column B here.

âž¤ When the mouse pointer changes to a left-right arrow, then just double-click it.

See the text is now fitted with the cells.

Steps For Row:Â

âž¤ Point your mouse to the extension bar between successive two-row numbers (7 and 8) of the cells. Iâ€™ll expand Row 7 here.

âž¤ When the mouse pointer changes to an up-down arrow, then just double-click it.

Look, the row is now fitted with the cell.

## 2. Using Excel AutoFit Command

Now, in this method, Iâ€™ll do the same operation by using the AutoFit option from the Home tab.

Steps:Â

âž¤ Select the row/column you want to apply AutoFit.

âž¤ Then click Home > Cells > Format > AutoFit Row Height / AutoFit Column Width

Now itâ€™s done.

Read More: How to Use AutoFit Shortcut in Excel

## 3. Expanding Multiple Excel Cell to AutoFit Text

In this method, weâ€™ll use the previous two methods simultaneously for multiple cells.

Steps For Column:

âž¤ Point your mouse to the extension bar between the selected columns.

âž¤ When the mouse pointer changes to a left-right arrow, double-click it.

See the cells are expanded.

Steps For Row:

âž¤ Point your mouse to the extension bar between the selected rows.

âž¤ When the mouse pointer changes to an up-down arrow, double-click it.

Both of the rows are now fitted with text.

## 4. Using a Keyboard Shortcut to Make Excel Cells Expand Automatically

In this method, Iâ€™ll use a Keyboard Shortcut to make Excel cells expand to fit text automatically.

Steps For Column:Â

âž¤ Select the column.

âž¤ Then use the keyboard shortcut ALT + H + O + I

Steps For Row:Â

âž¤ Select the row

âž¤ Then use the keyboard shortcut ALT + H + O + A.

Read More: How to Make Cells Independent in Excel

## 5. Using Excel VBA to AutoFit Text Strings

Making Excel cells expand can also be done by using VBA. Letâ€™s see how to do it.

Step 1:

âž¤ Right-click on the sheet title name.

âž¤ Then press the View Code option. A VBA window will open up.

Step 2:

âž¤ Select Worksheet from the drop-down options.

Step 3:

âž¤ Type the codes given below.

``````Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.EntireColumn.AutoFit
End Sub``````

Step 4:

Now press anywhere in the Excel sheet, and all cells will be fitted. And from now when you input new text again then the cell will be fitted automatically.

Read More: How to Make a Cell Bigger in Excel

## 6. Applying Wrap Text Command to Make Excel Cells Expand to Fit Text Automatically

Itâ€™s an alternative method to make Excel cells expand to fit text automatically.

Step 1:

âž¤ Select the cell, then click Home > Alignment > Wrap Text.

See, the text is now being shown in two lines.

Step 2:Â

âž¤ Now double-click on that row, and it will be fitted.

## 7. Using Shrink to Fit Option to AutoFit Cells in Excel

In this last method, Iâ€™ll show how to shrink text to autofit.

Steps:Â

âž¤ Select the cells to which you want to shrink the text.

âž¤ Press Ctrl+1. A dialog box will open up.

âž¤ Then click Alignment > Shrink to Fit > OK.

The text in the cell is now shrunk. See the image below.

## Conclusion

I hope all the methods described above will be well enough to make Excel cells expand to fit text automatically. Feel free to ask any questions in the comment section, and please give me feedback.

## Related Articles

<< Go Back to Cell Size | Excel Cells | Learn Excel

## What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio