There are a few ways to autofit column width in Microsoft Excel. The easiest being to select the cells you want to autofit then double-click on one of the column divider lines. Doing so will automatically scale your selected cell width to match the containing text.
How to Select All Cells in Excel
The easiest method to select all cells is to click the top left corner box where the columns and rows meet. Alternatively, you can use the Ctrl + A keyboard shortcut on Windows, or Command + A on a Mac.
Alternative Method to AutoFit Column Width
1. Select the cells that you want to autofit.
2. Go to the Home tab and select Format.
3. Select AutoFit Column Width.
How to AutoFit Row Height in Excel
1. Select the cells you want to autofit the row height on.
2. Select Home from the top.
3. Select Format then AutoFit Row Height.
What Does AutoFit Column Width Do?
When you select the AutoFit Column Width option your selected cells will automatically size to better fit the contained text. This will increase the column width for columns with long text, or decrease the column size where there are less text. This allows you to keep your data looking clean without having overhanging text or blank boxes.