When you type long text into an Excel cell, it often spills over or gets cut off, making your spreadsheet look messy. This guide shows you the fastest ways to automatically resize columns so every column fits its content perfectly. You can do this with a double-click, a keyboard shortcut, or a ribbon command—all in under a minute.
What You’ll Need
- A computer with Microsoft Excel (Microsoft 365, Excel 2021, 2019, or 2016). Steps for Mac and Excel for the web are noted where they differ.
- The workbook you want to adjust, with the data already entered.
Step-by-Step
- Select the columns you want to resize. Click the letter at the top of the first column (e.g., A), then drag across the letters of all columns you want to adjust. To select the entire sheet, click the triangle where the row numbers and column letters meet (top-left corner) or press Ctrl+A (Windows) / Cmd+A (Mac) twice.
- Use the double-click method (quickest). With the columns selected, hover your mouse over the boundary line between any two selected column letters (e.g., between A and B) until the cursor changes to a double-headed arrow (↔). Double-click. Excel instantly resizes all selected columns to fit their longest text entry.
- Alternatively, use the ribbon command. With columns selected, go to the Home tab, find the Cells group, click Format, and choose AutoFit Column Width. This does the same thing as the double-click.
- Keyboard shortcut (Windows only). Select the columns, then press Alt+H, then O, then I. This triggers the AutoFit command. On a Mac, there is no direct keyboard shortcut; use the ribbon or double-click instead.
- For Excel on the web (browser). Select the columns, then go to the Home tab, click Format (in the Cells group), and choose AutoFit Column Width. Double-clicking the boundary also works in most browsers.
- Resize a single column manually (if needed). If you only want to adjust one column, click its letter, then double-click the boundary to its right. Or drag the boundary to your desired width.
Common Mistakes
- Selecting only one cell instead of the whole column. If you select a cell (not the column letter) and double-click the boundary, Excel may auto-fit only that row’s content, not the entire column.
- Merged cells. AutoFit does not work on columns that contain merged cells. The column width will not adjust to fit the merged text.
- Wrap text is on. If you have enabled Wrap Text (Home > Alignment), the column width may not auto-fit because Excel expands row height instead. You may need to turn off wrap text or adjust the row height manually.
- Hidden columns. AutoFit does not apply to hidden columns. You must unhide them first (select surrounding columns, right-click, choose Unhide).
Tips
- Set a specific width instead of auto-fit. If you want all columns to be the same width, select them, go to Home > Format > Column Width, and enter a number (e.g., 15). This is useful for uniform tables.
- Use AutoFit for rows too. The same methods work for rows: select rows, then double-click the boundary between row numbers, or use Home > Format > AutoFit Row Height.
- Keyboard shortcut for entire sheet. Press Ctrl+A twice to select the entire sheet, then double-click any column boundary to fit all columns at once.
- Combine with Wrap Text. When you have long paragraphs, consider enabling Wrap Text and then auto-fitting the row height, which often looks better than extremely wide columns.
Troubleshooting
- AutoFit doesn’t work at all. Check if the columns are grouped (selecting multiple columns and then double-clicking a boundary should work). Also make sure the worksheet is not protected—go to Review > Unprotect Sheet if needed.
- Column width resets to a default after saving. This can happen if you have a macro or conditional formatting that changes widths. Check for VBA code in the workbook that may run on open or change events.
- Text is still cut off after auto-fit. This usually happens when the cell contains a long unbroken string (like a URL) that exceeds the maximum column width (255 characters). Excel will not widen beyond that. You can wrap the text or reduce the font size.
- Double-clicking doesn’t respond. Make sure you are precisely on the boundary line between column letters. The cursor must change to the double-headed arrow. If it doesn’t, try the ribbon command instead.
Frequently Asked Questions
- Does AutoFit work on merged cells? No. Merged cells do not auto-fit. You must unmerge them (Home > Merge & Center > Unmerge Cells) or manually set the column width.
- Can I auto-fit all columns at once? Yes. Select the entire sheet (Ctrl+A twice) or all columns, then double-click any column boundary.
- Why does my column width not change when I double-click? Likely because the column is hidden, merged, or the cell contains a formula that returns a blank value. Check for these issues.
- Is there a way to auto-fit columns in Excel for Mac? Yes. Select the columns, then go to Home > Format > AutoFit Column Width (the ribbon path is the same). The double-click method also works on Mac.
- Can I set a maximum width when auto-fitting? No, AutoFit always fits to the longest content. To limit width, set a fixed column width manually.
- Does AutoFit work in Google Sheets? This article is for Excel, but in Google Sheets you can select columns, then right-click and choose Resize columns > Fit to data.
Related
- Shortcut to Lock System: Fastest Ways on Windows & Mac
- BETWEEN in BigQuery: Syntax, Examples & Gotchas
- Refresh PivotTable Data? How to Update in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Create a PowerPoint Template With Your Company LogoTo create a PowerPoint template with your company logo, add the logo to the Slide Master in Microsoft…
- Audit an Excel Sheet: A Practical Review ChecklistTo audit an Excel sheet, check its inputs, formulas, totals, data quality, hidden content, and external links, then…
- Filter Unique Values in Google Sheets With a FormulaIf the values are in A2:A and their statuses are in B2:B, enter =UNIQUE(FILTER(A2:A7,B2:B7="Paid",A2:A7<>"")) to return each nonblank…
- Find Duplicates in Google Sheets: A Step-by-Step GuideTo find duplicate values in Google Sheets, select the cells you want to check, choose Format > Conditional…
- Excel Power Query Merge Two Queries: Step-by-StepTo merge two queries in Excel Power Query, go to the Home tab in the Power Query Editor,…
- Google Sheets vs Excel: Which Spreadsheet Fits?Google Sheets is usually the better fit for browser-based collaboration and simple shared workflows; Microsoft Excel is generally…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.