Easy Shortcut: How to fit text to cell in Excel

August 1, 2022

A free Office suite fully compatible with Microsoft Office

Free Download

When you input anything that takes up more space than the usual row height and column width in Excel, you'll find that it spills outside of those boundaries (as shown below).

To fit the text in the cell in certain circumstances, you can modify the rows and columns (so that the text is completely within the cell).

The Excel AutoFit function may be used for this:

What Excel AutoFit is?

If you input anything in an Excel cell, you'll notice that it spills when the amount of text or data is more than the column's width.

Excel's AutoFit tool enables you to easily change the row height or column width to perfectly match the text (so that there is no spilling over to other cells).

Additionally, using AutoFit eliminates the need to explicitly select the column width and row height (or manually drag and adjust the column width). Because it is automatic, it will determine how much to expand or shrink to accommodate the contents of the present cell.

AutoFit Column Width: Using this function, the column width is automatically changed to fit the text in the cell. You can simultaneously fit text into several columns (as we will see later in examples).

Autofit row height: Row height is automatically adjusted by the autofit row function to fit the text in the cell. Multiple rows can be autofitted at once.

When you add many lines in a single cell, you will typically see that Excel automatically changes the row height. You won't need to modify the row height in those circumstances.

AutoFit Rows and Columns With a Double-Click of the Mouse:

Assume you have a dataset like the one below, where the text overflows onto the adjacent column when the width of that column decreases.

Here's how to use the mouse to automatically adjust column width:

Place the cursor to the column header's right border.The pointer would then shift to a double-sided arrow icon.Set the cursor to the column's right edge.Use your mouse's left key twice (or the trackpad)

AutoFit Columns and Rows Using a Shortcut on the Keyboard:

This technique is for you if you don't like using the mouse and would rather utilise a keyboard shortcut.The keyboard shortcuts for autofitting the cells are shown below:Automatically fill column width:ALT + H + O + IRow height autofill:ALT + H + O + A

Solution if Auto-fit isnt working:Wrap Text:

If a cell has a lot of text, autofitting the column will cause the cell to grow and the column to become enormous.This might not be the best method to display your data; instead, a wider row and smaller column could make more sense.The content of the cell stays within the cell when wrap text is applied to it. You are then able to automatically adjust the row height to match the column width after selecting the desired column width.

Did you learn about how to fit cell to text in Excel file? You can follow WPS Academy to learn more features of Word Document, Excel Spreadsheets and PowerPoint Slides.

You can also download WPS Office to edit the word documents, excel, PowerPoint for free of cost. Download now! And get an easy and enjoyable working experience.