FICPAYou Are Here:
AutoFit Column Widths and Row Heights in Excel
Excel’s grid-like appearance can seem static at times without the possibility of creating customized interfaces to match the needs of the data stored in a worksheet. Although this is true to some extent, Microsoft has built in to Excel the ability to instantly customize column widths and row heights to match the size of the data in the cells.
Learn how to use Excel’s AutoFit feature to automatically change the size of columns and rows to the size of the data in a worksheet.Before You Change Column Widths and Row Heights in Excel
There are limits to how big and small you can make columns and rows in Excel. Column widths and row heights with a value of zero are hidden in an Excel worksheet. This is the equivalent to using the hide column or row feature.
Columns can have a maximum width of 255. This number represents the maximum number of characters a column can hold at the standard font size. Changing the font, the font size, and adding other characteristics to the font such as italics and bolding greatly reduce the maximum number of characters a column can hold. The default size of an Excel column is 8.43, which correlates to 64 pixels.
Rows can have a maximum height of 409. This number represents how many one-seventy seconds of an inch the row can hold. The default size of an Excel row is 15, which correlates to 20 pixels or about one-fifth of an inch.Using Excel’s AutoFit Feature
Suppose in your Excel worksheet you have text in the A1 cell that extends beyond the 8.43 (64 pixels) default column width. Notice that although the column’s width cannot contain the length of the text, Excel allows the text to spill over into adjacent columns.
Select Column A, click on the Home tab on the Ribbon, and locate a section of the Ribbon almost all the way to the right labeled Cells. Click on the button titled Format and locate a section of the menu labeled Cell Size. Notice that there are three options for changing the width of a column.
Column Width – This option allows you to manually change the width of a column by typing in a number. This option isn’t useful because you can more easily accomplish the same thing by simply dragging the column to your desired size.
AutoFit Column Width – This is the option we want. This option will change the size of the column to a new size depending on the length of the contents of the cell in the column that takes up the most space.
Default Width – This option doesn’t actually change the width of any columns; it simply changes the default width of the columns for a particular worksheet.
On the Format button’s menu, select AutoFit Column Width and notice that the width of Column A has changed to contain the length of the text in the A1 cell.
Unlike column widths, Excel automatically adjusts the height of a row to accommodate the height of the text that takes up the most vertical space in each row. Therefore, the AutoFit Row Height feature found on the Format button is not as useful as the AutoFit Column Width feature.
When pasting data into an Excel worksheet, there are times when the row heights do not adjust automatically. When this happens, text will be cut off rather than spill over into another row either above or below.
To fix this, select the row with the cut-off text and click on Format>AutoFit Row Height. This will force Excel to change the height of the row to accommodate the unusually tall text.
Using Excel’s AutoFit feature you can automatically change the width of columns and the height of rows in a worksheet to accommodate different sized text without having to manually change the width and height values. A real time saver, the AutoFit feature can also make data in your worksheet easier to access and read.
This Tech Tip is brought to you by the Business and Technology Section ... IT solutions for today's CPAs. For more information and to view an archive of previous Tech Tips, please visit us here.
Do you have specific topics you would like to see covered in Tech Tips? Email any suggestions to email@example.com.
LAST UPDATED 12/30/2010