How to AutoFit in Excel: adjust columns and rows to match data size (2024)

In this tutorial, you will learn how to use the Excel AutoFit feature to make cells, columns or rows expand to fit text automatically.

Microsoft Excel provides a handful of different ways to change column width and adjust row height. The easiest way to resize cells is to have Excel automatically determine how much to widen or narrow the column and to expand or collapse the row to match the data size. This feature is known as Excel AutoFit and further on in this tutorial you will learn 3 different ways to use it.

Excel AutoFit - the basics

Excel's AutoFit feature is designed to automatically resize cells in a worksheet to accommodate different sized data without having to manually change the column width and row height.

AutoFit Column Width - changes the column width to hold the largest value in the column.

AutoFit Row Height - adjusts the column width to match the largest value in the row. This option expands the row vertically to hold multi-line or extra-tall text.

Unlike column width, Microsoft Excel changes the row height automatically based on the height of the text you type in a cell, therefore you won't really need to auto fit rows as often as columns. However, when exporting or copying data from another source, row heights may not auto adjust, and in these situations the AutoFit Row Height opting comes in helpful.

When resizing cells in Excel, either automatically or manually, please bear in mind the following limits to how big columns and rows can be made.

Columns can have a maximum width of 255, which is the maximum number of characters in the standard font size that a column can hold. Using a bigger font size or applying additional font characteristics such as italics or bold may significantly reduce the maximum column width. The default size of columns in Excel is 8.43.

Rows can have a maximum height of 409 points, with 1 point equal to approximately 1/72 inch or 0.035 cm. The default height of an Excel row varies from 15 points on a 100% dpi to 14.3 points on a 200% dpi.

When a column width or row height is set to 0, such column/row is not visible on a sheet (hidden).

How to AutoFit in Excel

What I particularly like about Excel is that it provides more than one way to do most things. Depending on your preferred work style, you can auto fit columns and rows by using the mouse, ribbon or keyboard.

AutoFit columns and rows with a double-click

The easiest way to auto fit in Excel is by double-clicking the column or row border:

  • To autofit one column, position the mouse pointer over the right border of the column heading until the double-headed arrow appears, and then double click the border.
  • To autofit one row, hover the mouse pointer over the lower boundary of the row heading, and double click the border.
  • To autofit multiple columns / multiple rows, select them, and double click a boundary between any two column / row headings in the selection.
  • To autofit the whole sheet, press Ctrl + A or click the Select All button How to AutoFit in Excel: adjust columns and rows to match data size (1) and then, depending on your needs, double click a border of any column or row heading, or both.

How to AutoFit in Excel: adjust columns and rows to match data size (2)

AutoFit columns and rows by using the ribbon

Another way to make Excel cells expand to fit text automatically is by using the following options on the ribbon:

To AutoFit column width, select one, several or all columns on the sheet, go to the Home tab > Cells group, and click Format > AutoFit Column Width.

To AutoFit row height, select the row(s) of interest, go to the Home tab > Cells group, and click Format > AutoFit Row Height.
How to AutoFit in Excel: adjust columns and rows to match data size (3)

AutoFit column width and row height using a keyboard shortcut

Those of you who prefer working with the keyboard most of the time, may like the following way to auto fit in Excel:

  1. Select any cell in the column/row you want to autofit:
    • To autofit multiple non-adjacent columns/rows, select one column or row and hold down the Ctrl key while selecting the other columns or rows.
    • To autofit the entire sheet, press Ctrl + A or click the Select All button.
  2. Press one of the following keyboard shortcuts:
    • To AutoFit column width: Alt + H, then O, and then I
    • To AutoFit row height: Alt + H, then O, and then A

Please pay attention that you should not hit all the keys together, rather each key/key combination is pressed and released in turn:

  • Alt + H selects the Home tab on the ribbon.
  • O opens the Format menu.
  • I selects the AutoFit Column Width option.
  • A selects the AutoFit Row Height option.

If you are not sure you can remember the whole sequence, don't worry, as soon as you press the first key combination (Alt + H) Excel will display the keys to access all options on the ribbon, and once you open the Format menu, you will see the keys to select its items:
How to AutoFit in Excel: adjust columns and rows to match data size (4)

Excel AutoFit not working

In most situations, the Excel AutoFit feature works without a hitch. There are times, however, when it fails to auto size columns or rows, especially when the Wrap Text feature is enabled.

Here's a typical scenario: you set the desired column width, turn Text Wrap on, select the cells of interest, and double click a row separator to autofit the row height. In most cases, rows are sized properly. But sometimes (and this may happen in any version of Excel 2007 to Excel 2016), some extra space appears below the last line of text as show in the screenshot below. Moreover, the text may look correctly on the screen, but gets cut off when printed.
How to AutoFit in Excel: adjust columns and rows to match data size (5)

By trial and error, the following solution for the above problem has been found. At first sight, it may seem illogical, but it does work :)

  • Press Ctrl + A to select the whole worksheet.
  • Make any column a fair amount wider by dragging the right boundary of the column heading (because the entire sheet is selected, all the columns will be resized).
  • Double-click any row separator to auto fit the row height.
  • Double-click any column separator to auto fit the column widths.

Done!

Alternatives to AutoFit in Excel

The Excel AutoFit feature is a real time saver when it comes to adjusting the size of your columns and rows to match the size of your content. However, it's not an option when working with large text strings that are tens or hundreds of characters long. In this case, a better solution would be wrapping text so that it displays on multiple lines rather than on one long line.

Another possible way to accommodate long text is to merge several cells into one big cell. To do this, select two or more adjacent cells and click Merge & Center on the Home tab, in the Alignment group.

This is how you use the AutoFit feature in Excel to increase cell size and make your data easier to read. I thank you for reading and hope to see you on our blog next week!

You may also be interested in

  • How to change column width and AutoFit columns in Excel
  • How to align text in Excel
  • How to adjust row height in Excel
  • How to wrap text in Excel
  • How to use Excel AutoCorrect
  • How to spell check in Excel
How to AutoFit in Excel: adjust columns and rows to match data size (2024)

FAQs

How to AutoFit in Excel: adjust columns and rows to match data size? ›

Select the column or columns that you want to change. Go to Home > Cells > Format. Under Cell Size, select AutoFit Column Width. Note: To quickly autofit all columns on the worksheet, select Select All, and then double-click any boundary between two column headings.

How to make Excel rows and columns the same size? ›

To AutoFit column width, select one, several or all columns on the sheet, go to the Home tab > Cells group, and click Format > AutoFit Column Width. To AutoFit row height, select the row(s) of interest, go to the Home tab > Cells group, and click Format > AutoFit Row Height.

How do you adjust the field column widths using AutoFit or best fit? ›

Resize a column or table automatically with AutoFit
  1. Select your table.
  2. On the Layout tab, in the Cell Size group, select AutoFit.
  3. Do one of the following. To adjust column width automatically, select AutoFit Contents. To adjust table width automatically, select AutoFit Window.

How to apply AutoFit in Excel? ›

Home > Format > Autofit column width or ALT-H-O-I it fits it to the maximum width of the cells selected and not the whole column. Hope this helps someone out.

What is the shortcut for autofit column width in Excel? ›

Autofit Column Width: Similar to row height, you can swiftly adjust a column's width to fit its contents by selecting the column(s) and pressing Alt + H + O + I. The shortcut ensures all data within the selected column(s) is fully visible.

How to use autofit to resize columns g and j to their best fit? ›

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.

How do you AutoFit column width in sheets? ›

Believe it or not, you CAN use Alt + H + O + I to autofit column width in Google Sheets.

How to auto adjust column width in Excel with code? ›

To fit the cells using a keyboard follow the below steps:
  1. Step 1: Press 'Alt'
  2. Step 2: Press 'H'.
  3. Step 3: Press 'O'. Step 4: Press 'I' for Autofit Column Width or Press 'A' for Autofit Row Height.
Apr 10, 2024

How do you AutoFit column width wrap text in Excel? ›

Wrap text automatically

In a worksheet, select the cells that you want to format. On the Home tab, in the Alignment group, select Wrap Text. (On Excel for desktop, you can also select the cell, and then press Alt + H + W.)

How do you auto align all cells in Excel? ›

Press Ctrl + A (Command + A) together to select your whole sheet or hold Ctrl (Command) and select one column and any other adjacent or non-adjacent columns you need to adjust. 3. Press Alt + H, then O, and then I to AutoFit columns and Alt + H, then O, and then A to AutoFit rows.

How do you AutoFit rows and columns in sheets? ›

The autosizing feature will allow you to set a column's width to fit its content automatically.
  1. Hover the mouse over the line between two columns. The cursor will turn into a double arrow.
  2. Double-click the mouse.
  3. The column's width will be changed to fit the content.

Top Articles
MX Guarddog review: Filter spam for your domain-based emails for free!
MX Guarddog Free Spam Filtering – Add New Domain
Dainty Rascal Io
Poe T4 Aisling
Calvert Er Wait Time
Melson Funeral Services Obituaries
Missed Connections Inland Empire
Occupational therapist
What to Do For Dog Upset Stomach
Dollywood's Smoky Mountain Christmas - Pigeon Forge, TN
Obituary (Binghamton Press & Sun-Bulletin): Tully Area Historical Society
Dr Lisa Jones Dvm Married
Bluegabe Girlfriend
Volstate Portal
What Was D-Day Weegy
Kagtwt
Southland Goldendoodles
Globe Position Fault Litter Robot
Byte Delta Dental
Wal-Mart 140 Supercenter Products
Itziar Atienza Bikini
Jet Ski Rental Conneaut Lake Pa
Closest Bj Near Me
FDA Approves Arcutis’ ZORYVE® (roflumilast) Topical Foam, 0.3% for the Treatment of Seborrheic Dermatitis in Individuals Aged 9 Years and Older - Arcutis Biotherapeutics
Wsop Hunters Club
Football - 2024/2025 Women’s Super League: Preview, schedule and how to watch
1973 Coupe Comparo: HQ GTS 350 + XA Falcon GT + VH Charger E55 + Leyland Force 7V
Happy Homebodies Breakup
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
Sound Of Freedom Showtimes Near Movie Tavern Brookfield Square
Dove Cremation Services Topeka Ks
10-Day Weather Forecast for Santa Cruz, CA - The Weather Channel | weather.com
My Reading Manga Gay
Star News Mugshots
Egg Crutch Glove Envelope
Siskiyou Co Craigslist
Tmj4 Weather Milwaukee
Pch Sunken Treasures
Mg Char Grill
Stolen Touches Neva Altaj Read Online Free
Hattie Bartons Brownie Recipe
Restored Republic December 9 2022
Craigslist Freeport Illinois
Elven Steel Ore Sun Haven
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
Playboi Carti Heardle
2294141287
Minute Clinic Mooresville Nc
Samantha Lyne Wikipedia
Besoldungstabellen | Niedersächsisches Landesamt für Bezüge und Versorgung (NLBV)
Grace Charis Shagmag
Leslie's Pool Supply Redding California
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 6077

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.