To expand every column in Excel for Microsoft 365 on Windows, click the Select All button at the top-left corner of the worksheet, where the row numbers and column letters meet, then choose Home > Format > AutoFit Column Width. Excel adjusts the selected columns to fit their contents; the Windows keyboard sequence is Alt+H, O, I.
What AutoFit does
AutoFit Column Width changes column widths so the cell contents are easier to read. It measures the displayed contents in the selected columns and sizes each column to accommodate them. A column with short entries may stay narrow, while one containing a longer name, date, or heading will become wider. The command applies separately to each selected column rather than making every column the same width.
Excel’s column width is based on character units, not a fixed number of pixels. The font and formatting used in the cells affect how much screen space the displayed text needs. Consequently, the same text can require a different width in a workbook with different fonts or font sizes.
AutoFit is a sizing command, not a text-editing command: it does not change the values, formulas, or number formats in your cells. It also does not automatically adjust row heights. If a cell contains wrapped text, you may need to use AutoFit Row Height separately to show all its lines.
Expand every column on Windows
- Open the worksheet you want to change. AutoFit works on the active sheet selection, so repeat the steps on other sheets if needed.
- Click the Select All button at the intersection of the row-number and column-letter headings. The entire worksheet should become selected.
- On the ribbon, select Home > Format > AutoFit Column Width.
- Review the result. Each column should now fit its contents, subject to Excel’s width limit and the behavior of merged cells.
There is also a quick mouse method: after selecting the whole worksheet, move the pointer to the boundary between any two column letters until the pointer changes to a column-resize symbol, then double-click. Excel autofits the selected columns. Because every column is selected, the double-click applies the adjustment across the sheet.
For the keyboard method, click a cell in the worksheet, select the whole sheet, and press Alt+H, O, I in sequence. These are ribbon KeyTips: press Alt, then H, then O, then I. If the sequence does not work in your setup, use the ribbon path, which is more straightforward and avoids differences in keyboard layout or interface settings.
Selecting the whole sheet reliably
The Select All button is the most reliable way to target every worksheet column. Clicking it selects the full grid, including currently empty cells, so the AutoFit command can act on the columns across the sheet. If you only want to resize a particular part of the worksheet, select those columns instead: click a column letter, or drag across several adjacent column letters. To select separated columns, hold Ctrl while clicking their letters on Windows.
Ctrl+A can be useful, but its result depends on where the active cell is. When the selection is within a data region or table, Ctrl+A may select that region first rather than the complete worksheet. Clicking the Select All button avoids having to judge which range the shortcut selected. If a column stays unchanged, check that the full worksheet or the intended column letters are actually selected.
Selection can also be limited by the way you select a range. Selecting cells in a few rows and choosing AutoFit adjusts the selected columns based on the selected cells, not necessarily on longer entries elsewhere in those columns. To fit a column to all its worksheet contents, select the entire column by clicking its letter, or select the whole sheet before applying AutoFit.
Excel for Mac and Excel for the web
In Excel for Microsoft 365 on Mac, select the entire sheet using the Select All button, then use Format > Column > AutoFit Selection. The exact ribbon and menu presentation can vary with the Mac interface, but the command resizes the selected columns. Command+A can select a region rather than the whole sheet depending on the active cell, so the Select All button remains a dependable option. The Windows Alt+H, O, I sequence does not apply to Mac.
In Excel for the web, select the worksheet using the Select All button and look for Home > Format > AutoFit Column Width. If the ribbon is simplified or the window is narrow, expand the relevant ribbon controls or use the available Format menu. You can also drag or double-click a column boundary to resize columns, although selecting the entire sheet first is important when you want the adjustment to cover all columns.
On either platform, menus and ribbon layouts can change slightly as Microsoft updates the interface. Look for the command named AutoFit Column Width rather than a similarly named option for row height. If you are working in a shared or protected workbook and cannot change widths, the sheet’s protection settings or editing permissions may restrict formatting.
AutoFit compared with dragging and equal widths
AutoFit is useful when the goal is to reveal the contents without deciding on a particular size. It chooses a width separately for each selected column. Dragging a column boundary, by contrast, gives you direct control: you can set a column to a specific width or make it wider or narrower by eye. Dragging is often preferable when you want a consistent visual layout rather than the widest possible display of every entry.
If all columns need to have the same width, select the columns and set a width through Home > Format > Column Width. Entering a shared value produces uniform columns; AutoFit does not. A common practical approach is to AutoFit first, then narrow exceptionally wide columns manually if they make the sheet difficult to scan or print.
- Choose AutoFit when you want each column to fit its contents quickly.
- Choose a fixed column width when you need consistent alignment across a report.
- Drag a boundary when you want to make a visual adjustment without entering a number.
- Use Wrap Text when a long entry should occupy several lines instead of making its column very wide.
Why a column may still look wrong
AutoFit cannot always produce the layout people expect. A long address or description may make one column so wide that the rest of the worksheet is awkward to view. In that case, wrap the text or choose a practical width instead of trying to show the full entry on one line. To wrap selected cells, choose Home > Wrap Text. You may also need Home > Format > AutoFit Row Height so the additional lines are visible.
Merged cells are a notable exception. Excel does not reliably AutoFit a column based on text in a merged cell. If a heading spans several columns and remains clipped, you can adjust the column widths manually, unmerge the cells and use another layout, or add line breaks and set a suitable row height. Avoid assuming that selecting the entire sheet will make merged headings size themselves correctly.
Also check whether the cell’s displayed value is actually wider than the space available. A number format can show a date, currency value, or rounded number differently from the underlying value; AutoFit works with the display. If a numeric cell shows a row of hash marks, the column is commonly too narrow to display the formatted value, so AutoFit or a manual increase may resolve it. In some cases the marks indicate a negative date or time value, which making the column wider will not fix.
Other causes include hidden columns, a manually adjusted width after AutoFit, or a font size that makes the content wider than expected. AutoFit does not unhide hidden columns. If a column is hidden, select the neighboring column headings and choose Home > Format > Hide & Unhide > Unhide Columns. Then apply AutoFit if necessary. If the sheet is protected, you may need permission to change its formatting.
Managing very wide columns and print layout
A worksheet can contain a very long text value, such as a URL, comment, or imported description. Autofitting every column may give that one entry disproportionate space. Excel also has a maximum column width of 255 characters; if a value needs more space, AutoFit cannot make the column unlimited. Consider wrapping the text, shortening a display label, or keeping the full text in a cell while using a more compact presentation elsewhere.
Fitting text on screen does not guarantee that the sheet will print on one page. AutoFit changes column widths, which can increase the total width of the printed worksheet. For printing, check File > Print and review the preview. Page orientation, margins, scaling, and page breaks affect the print result. Scaling a wide sheet to fit one page can make text too small, so compare readability with the number of pages you need.
Column widths are stored as worksheet formatting, not as a temporary display option. If you do not like the change, press Ctrl+Z on Windows immediately after AutoFit; on Mac, use Command+Z. Undo is useful for reversing the recent width adjustment, but it may also undo other recent edits if you press it repeatedly. You can instead set a preferred width manually through Home > Format > Column Width.
Frequently Asked Questions
Can I AutoFit all columns in every worksheet at once?
AutoFit applies to the selected sheet columns. To resize multiple worksheets together, group the relevant sheet tabs first, select the columns or whole sheet, and apply AutoFit; then ungroup the sheets. Be careful: grouped-sheet edits affect every selected sheet, so confirm the sheets are meant to share the change.
What is the shortcut to AutoFit all columns in Excel?
On Windows, select the entire worksheet and press Alt, H, O, I in sequence. The shortcut only affects the current selection, so select the whole sheet first if you want every column fitted. On Mac, use the menu command Format > Column > AutoFit Selection instead.
Does AutoFit adjust row height too?
No. AutoFit Column Width changes column widths. To adjust row height, select the relevant rows and choose Home > Format > AutoFit Row Height. Wrapped text may need a row-height adjustment to display all its lines.
Why does AutoFit make one column extremely wide?
Excel is accommodating a long displayed value in that column. Wrap the text, set a fixed width, or shorten the visible entry if a broad column is not useful. AutoFit is designed to fit content, not to optimize the overall appearance of the worksheet.
Will AutoFit work on merged cells?
Not reliably. Text in merged cells may not cause the relevant columns to resize as expected. Adjust the widths and row height manually, or consider a layout that does not rely on merged cells for the text you need to display.
A practical final check
After fitting the columns, scan the sheet for unusually wide fields, hidden columns, merged headings, and wrapped text with insufficient row height. A good result is not necessarily the widest possible version of every column: it is a readable sheet that makes important values visible without wasting space. For a one-time cleanup, select the whole worksheet and use AutoFit; for a polished report, follow up with deliberate widths and a print-preview check.
Related
- Excel Text to Columns: Use a Line Break Delimiter
- Excel Text to Columns: Split at the Last Space
- Excel Text to Columns: Split at Line Breaks
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Visible Cells Only Shortcut: How It Works in ExcelIn Excel for Microsoft 365 on Windows, select the range you want and press Alt+; (semicolon) to select…
- Protect Sheet in Excel: Allow Editing in Certain CellsYes. In Excel for Microsoft 365, you can protect a worksheet while leaving particular cells editable: unlock those…
- Rank in Excel: How to Rank Values Largest to SmallestTo rank numbers in Excel from largest to smallest, enter =RANK.EQ(B2,$B$2:$B$7,0) in a new column and fill it…
- Filter Sort in Google Sheets: Sort Data Without Losing RowsTo filter and sort in Google Sheets, select your table, choose Data > Create a filter, then open…
- Group Rows in Smartsheet: Sheets, Reports, and ViewsYes—Smartsheet lets you organize rows, but the right method depends on what you mean by grouping. In a…
- How to Paste Email Addresses Into Excel Without ErrorsTo paste email addresses into Excel, copy them from your email or another source, select the first destination…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.