Excel Example – AutoFit in Excel

What is AutoFit in Excel?

AutoFit in Excel is a feature that automatically adjusts the width of columns or the height of rows to fit the contents inside them. This is useful when text or numbers are cut off in cells because the default column or row size isn’t large enough to display everything.

You probably know how to change the width of a column in Excel, but do you also know how to automatically fit the widest entry in a column?

AutoFit Column Width

The default width of a column is 64 pixels.

1. You can change the width of a column by clicking and dragging the right border of the column header.

Change Column Width

2. To automatically fit the widest entry in a column, double click the right border of a column header.

AutoFit Column

3. To autofit multiple columns, first select multiple columns by clicking and dragging over the column headers.

Note: to select non-adjacent columns, hold CTRL while clicking the column headers.

4. Next, double click the right border of one of the column headers.

AutoFit Multiple Columns

5. To change the width of all columns, first select all columns by clicking the Select All button.

Select All Columns

6. Next, change the width of a column.

Change Width of All Columns

AutoFit Row Height

The techniques described above can also be used to change the height of a row. Instead of clicking the right border of a column header, simply click the bottom border of a row header. There’s one more way to autofit columns or rows.

- Advertisement -
See also  Excel Example - Most Used Functions in Excel

1. First, select multiple rows by clicking and dragging over the row headers.

Select Multiple Rows

2. On the Home tab, in the Cells group, click Format.

Click Format

3. Click AutoFit Row Height.

Click AutoFit Row Height

Result:

AutoFit Row Height

Note: you can also use this technique to set a row height or a column width (see screenshot at step 3). Be careful, don’t think in pixels here. The default width of a column is 8.43 units and the default height of a row is 15.00 units.

Keyboard Shortcut

  • Select the row(s) you want to use this feature.
  • Press Alt + H, then O, then A.

Additional Tips:

  • To AutoFit all columns on the worksheet, press Ctrl + A (to select all) and then double-click any column border.
  • To AutoFit all rows on the worksheet, press Ctrl + A and then double-click any row border.
  • AutoFit can also be applied to individual cells or ranges of cells.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay in Touch

Stay in touch to boost your skills in Excel, HTML, and JavaScript! Get tips, tutorials, and practical examples to make your learning journey efficient, fun, and highly rewarding.

Related Articles