Excel Cell Auto Fit: How to Adjust Column and Row Size
In this article
To auto fit cells in Excel, double-click the boundary line on the right side of the column header or the bottom of the row header. This instantly adjusts the width or height to match the longest piece of data in that selection, eliminating "#####" errors and cut-off text.
Auto fitting is essential for maintaining professional-looking spreadsheets. When you enter data that exceeds the default cell width, Excel either cuts the text off visually or, in the case of numbers and dates, displays a series of hashtags (#####). Auto fitting ensures every character is visible without requiring you to manually drag and guess the correct width for every single column.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An open workbook containing data that needs resizing.
Step-by-Step
- Select your target area:
- To auto fit a single column, click the letter at the top of the column.
- To auto fit a single row, click the number at the left of the row.
- To auto fit multiple columns/rows, click and drag across the headers, or click the "Select All" button (the small triangle in the top-left corner where the row and column headers meet).
- Locate the boundary line:
- For columns: Hover your mouse cursor over the line that separates the header of your selected column and the next one to the right. Your cursor will change from a white cross to a double-sided arrow.
- For rows: Hover your mouse over the line that separates the bottom of your selected row and the one below it.
- Double-click to fit: Double-click the left mouse button quickly. Excel will automatically expand or shrink the column or row to perfectly fit the longest entry in that selection.
- Alternative Method (Ribbon Menu):
- Select the cells, columns, or rows you wish to adjust.
- Navigate to the Home tab on the top ribbon.
- In the Cells group, click Format.
- Select AutoFit Column Width or AutoFit Row Height from the dropdown menu. (Note: Menu labels may vary slightly depending on your version of Excel or region).
Common Mistakes
- Double-clicking inside the cell: Double-clicking inside the actual cell (where the data is) will enter "Edit Mode" for that cell. To auto fit, you must double-click the header boundary (the grey area with letters/numbers).
- Ignoring Hidden Columns: If you have hidden columns within a selected range, auto fitting the entire sheet may not always behave as expected for those hidden areas.
- Over-reliance on Auto Fit for Long Paragraphs: If a cell contains a very long sentence, auto fitting will make the column extremely wide, often pushing other data off the screen. In these cases, "Wrap Text" is a better solution.
- Selecting only the data, not the header: While the Ribbon menu method works with cells selected, the double-click shortcut requires you to be hovering over the header boundary.
Tips
- The "Select All" Shortcut: Press
Ctrl + A(Windows) orCmd + A(Mac) to select the entire sheet, then double-click any column boundary to auto fit every single column in the workbook simultaneously. - Uniform Widths: If you want multiple columns to be the exact same width (rather than fitting their specific content), select the columns and drag one boundary to the desired size. All selected columns will snap to that identical width.
- Combining with Wrap Text: For cells with extensive notes, use the Wrap Text button in the Home tab first, then auto fit the row height to ensure the wrapped text is fully visible.
Troubleshooting
If the auto fit function does not seem to work, try these steps in order:
- Check for Merged Cells: Auto fit does not work on columns or rows that contain merged cells. If a cell is merged across columns A and B, double-clicking the boundary of column A will not trigger the auto fit. You must unmerge the cells first.
- Verify Sheet Protection: If the workbook is protected, you may be unable to change column widths. Go to the Review tab and check if it says "Unprotect Sheet." If so, click it (you may need a password) to enable formatting changes.
- Check for Filtered Data: If you have a filter active, auto fitting may only account for the visible rows. Clear your filters to see if the auto fit adjusts to the true longest entry in the entire dataset.
- Restart Excel: If the cursor is not changing to the double-sided arrow when hovering over boundaries, a temporary software glitch may be occurring. Save your work and restart the application.
Frequently Asked Questions
Why do I see ##### in my cell?
This happens when a column is too narrow to display a numerical value, date, or time. Auto fitting the column width will resolve this instantly.
Can I auto fit cells automatically as I type?
Excel does not have a built-in "live" auto fit setting that adjusts as you type. You must either double-click the boundary or use the Format menu after the data is entered.
What is the difference between Auto Fit and Wrap Text?
Auto Fit changes the width of the column to fit the text on one line. Wrap Text keeps the column width the same but increases the row height to stack the text into multiple lines.
Does auto fit work on mobile versions of Excel?
Yes, though the interaction differs. On mobile, you typically tap the column header to select it, then tap and drag the boundary handle or use the formatting menu in the mobile app's tool ribbon.
Will auto fitting a column affect my print layout?
Yes. If auto fitting makes a column very wide, it may push your data beyond the printable page margin, causing the spreadsheet to print across multiple pages.