In this short tutorial, you will learn a few efficient ways to change the column width manually and have it adjusted automatically to fit the contents (AutoFit).
Changing the width of a column in Excel is one of the most common tasks that you perform daily when designing your reports, summary tables or dashboards, and even when using worksheets only to store or calculate data.
Microsoft Excel provides a variety of ways to manipulate the column width - you can resize columns using the mouse, set the width to a specific number or have it adjusted automatically to accommodate the data. Further on in this tutorial, you will find the detailed information about all these methods.
On an Excel spreadsheet, you can set a column width of 0 to 255, with one unit equal to the width of one character that can be displayed in a cell formatted with the standard font. On a new worksheet, the default width of all columns is 8.43 characters, which corresponds to 64 pixels. If a column's width is set to zero (0), the column is hidden.
To view the current width of a column, click on the right boundary of the column header, and Excel will display the width for you:
Columns in Excel do not resize automatically as you input data in them. If the value in a certain cell is too large to fit in the column, it extends over the column's border and overlaps the next cell. If the column to the right contains data, then a text string is cut off at the cell border and a numerical value (number or date) is replaced with a sequence of hash symbols (######) like shown in the screenshot below:
If you want the information in all cells to be readable, you can either wrap text or adjust column width.
I believe everyone knows the most common way to make a column wider or narrower by dragging the border of the column header to the right or to the left. What you might not know is that using this method you can adjust the width of several columns or all columns on the sheet at a time. Here's how:
- To change the width of a single column, drag the right border of the column heading until the column is set to the desired width.
- To change the width of multiple columns, select the columns of interest and drag the border of any column heading in the selection.
- To make all columns the same width, select the entire sheet by pressing Ctrl + A or clicking the Select All button , and then drag the border of any column header.
As explained at the beginning of this tutorial, the Excel column width value represents the number of characters that can be accommodated in a cell formatted with the standard font. To resize columns numerically, i.e. specify an average number of characters to be displayed in a cell, do the following:
- Select one or more columns that you wish to resize. To select all columns, press Ctrl + A or click the Select All button.
- On the Home tab, in the Cells group, click Format > Column Width.
- In the Column width box, type the desired number, and click OK.
In your Excel worksheets, you can also auto fit columns so that they get wider or narrower to fit the largest value in the column.
- To autofit a single column, hover the mouse pointer over the right border of the column header until the double-headed arrow appears, and then double click the border.
- To autofit multiple columns, select them, and double click any boundary between two column headers in the selection.
- To force all columns on the sheet to automatically fit their contents, press Ctrl + A or click the Select All button, and then double click a boundary of any column header.
Another way to autofit columns in Excel is by using the ribbon: select one or more columns, go to the Home tab > Cells group, and click Format > AutoFit Column Width.
When preparing a worksheet for printing, you may want to fix the column width in inches, centimeters or millimeters.
To have it done, switch to the Page Layout view by going to the View tab > Workbook Views group and clicking the Page Layout button:
Select one, several or all columns on the sheet, and drag the right boundary of any of the selected column headings until you set the required width. As you drag the boundary, Excel will display the column width in inches like shown in the screenshot below:
With the width fixed, you can exit the Page Layout view by clicking the Normal button on the View tab, in the Workbook Views group.
You already know how to make several or all columns on the sheet the same width by dragging the column border. If you have already resized one column the way you want, then you can simply copy that width to other columns. To have it done, please follow the steps outlined below.
- Copy any cell from the column that has the desired width. For this, right-click the cell and choose Copy in the context menu or select the cell and press Ctrl + C.
- Right-click a cell(s) in the target column(s), and then click Paste Special... .
- In the Paste Special dialog box, select Column widths, and click OK.
Alternatively, you can select some cells in the target columns, press the Paste Special shortcut Ctrl + Alt + V, and then press W.
The same technique can be used when you create a new sheet and want to make its column widths the same as those in an existing worksheet.
To change the default width for all columns on a worksheet or the entire workbook, just do the following:
- Select the worksheet(s) of interest:
- To select a single sheet, click its sheet tab.
- To select several sheets, click on their tabs while holding the Ctrl key.
- To select all sheets in the workbook, right-click any sheet tab, and choose Select All Sheets from the context menu.
- On the Home tab, in the Cells group, click Format > Default Width... .
- In the Standard column width box, input the value you want, and click OK.
As you see, there exist a handful of different ways to change column width in Excel. Which one to use depends on your preferred work style and situation. I thank you for reading and hope to see you on our blog next week!