Excel How To Autofit In Excel Function: Syntax, Examples & Tips

To autofit in Excel, double-click the boundary line between column headers or select the column(s) and press Alt + H, O, I.

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Need more than a single How To Autofit In Excel formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.

How to Autofit in Excel

Autofitting in Excel is a powerful feature that allows you to automatically adjust the width of columns or the height of rows to fit the contents of the cells. This can significantly enhance the readability of your spreadsheets, ensuring that all data is visible without any manual adjustments. In this blog post, we will explore various methods to autofit columns and rows in Excel, making your data presentation more efficient.

Why Use Autofit?

Using the autofit feature can save you time and effort when formatting your spreadsheets. Instead of manually dragging the edges of columns or rows to adjust their size, autofitting allows you to quickly resize them to accommodate the longest entry in each column or the tallest entry in each row. This is particularly useful when dealing with large datasets or when you frequently update your spreadsheet with new information.

Methods to Autofit in Excel

There are several ways to autofit columns and rows in Excel, and we will cover the most effective methods below.

1. Using the Mouse

The simplest way to autofit columns or rows is by using your mouse. This method allows for quick adjustments without navigating through menus.

Steps:

  1. Move your cursor to the right edge of the column header (for columns) or the bottom edge of the row header (for rows) until it changes to a double-sided arrow.
  2. Double-click the edge. The column or row will automatically resize to fit the contents.

This method is fast and intuitive, making it a favorite among many Excel users.

2. Using the Ribbon

You can also use the Excel ribbon to autofit columns or rows. This method is helpful if you prefer using menus over mouse actions.

Steps:

  1. Select the column(s) or row(s) you want to autofit. You can select multiple columns or rows by clicking and dragging across the headers.
  2. Go to the Home tab on the ribbon.
  3. In the Cells group, click on the Format dropdown menu.
  4. Choose Autofit Column Width for columns or Autofit Row Height for rows.

This method provides a clear and structured way to adjust your spreadsheet.

3. Using Keyboard Shortcuts

For those who prefer keyboard shortcuts, Excel offers a quick way to autofit columns and rows using a combination of keys.

Steps:

  1. Select the column(s) or row(s) you want to autofit.
  2. Press Alt + H, then O, and finally I to autofit the selected columns.
  3. Alternatively, press Alt + H, then O, and then A to autofit the selected rows.

This method allows you to keep your hands on the keyboard while efficiently resizing your cells.

Key Takeaways

  • Mouse Method: A quick and intuitive way to autofit columns and rows by double-clicking the edges.
  • Ribbon Method: A structured approach using the Excel ribbon to access autofit options.
  • Keyboard Shortcuts: A fast way to autofit cells for those who prefer keyboard navigation.

By utilizing these methods, you can efficiently autofit columns and rows in Excel, enhancing the organization and presentation of your data. Whether you're working on a detailed report or a simple list, autofitting can help you achieve a clean and professional look.

Happy Excel-ing!

Beyond the How To Autofit In Excel function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.

Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.

Need more help with Excel formulas?

Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.

Explore all Excel formulas

Browse our complete library of Excel formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.