Excel Practice Test

โ–ถ

To AutoFit row height in Excel, select the rows and choose Home > Format > AutoFit Row Height, or double-click the boundary below a row heading; to fit every row, click Select All first. AutoFit sizes each row to its contents, but Microsoft states it cannot be used on rows or columns that contain merged cells.

Excel auto row height is the feature that resizes a row vertically so every line of wrapped text, every oversized font, and every embedded line break fits inside the visible cell. This guide covers the ribbon, double-click, Key Tips, and VBA methods, using Microsoft's documentation for Microsoft 365, 2024, 2021, 2019, and 2016. For a broader overview, see our guide to row height in Excel.

Most spreadsheet users learn AutoFit by accident. You paste a paragraph into a cell, the text disappears below the cell border, and you start dragging row dividers manually. That approach works for three rows. It collapses when a worksheet holds thousands of customer notes or product descriptions. AutoFit removes the manual drag entirely.

Microsoft lists the default row height as 15 points. When you increase font size, enable Wrap Text, or add manual line breaks (Alt+Enter on Windows), the row may need to grow. AutoFit measures the tallest content in each row and sets the height to match, within the 409-point maximum.

There are five reliable ways to trigger it: the Home ribbon (Format, then AutoFit Row Height), Key Tips for keyboard access, double-clicking the boundary below a row heading, Select All plus double-click for the whole sheet, and VBA's Range.AutoFit method. Merged cells are the main exception, so it pays to know how they behave.

Merged cells break AutoFit: Microsoft states you cannot use AutoFit on a row or column that contains merged cells, and you must set those heights manually through the Format menu. Understanding this saves hours of confused troubleshooting.

This article assumes you are working with multiple rows of text content, possibly imported from CSV, copied from a web page, or typed manually with line breaks. We cover the foundations first, then the edge cases where AutoFit fails and what to do when it does.

Before going further, it is worth practicing core formatting skills with hands-on questions. Free Excel quizzes covering ribbon navigation, row formatting, and cell properties are an effective way to lock in muscle memory.

Excel Row Height by the Numbers

๐Ÿ“
15 pt
Default Row Height
๐Ÿ“Š
409 pt
Maximum Row Height
๐Ÿ–ฑ๏ธ
Home > Format
Ribbon Path
๐Ÿ”ข
1,048,576
Rows Per Sheet
โš ๏ธ
Not supported
AutoFit on Merged Cells
Try Free Excel Auto Row Height Practice Questions

Five Ways to Trigger AutoFit Row Height

๐ŸŽ€

Select rows, then go to Home โ†’ Cells โ†’ Format and, under Cell Size, choose AutoFit Row Height. Microsoft documents this for Excel for Microsoft 365, 2024, 2021, 2019, and 2016.

โŒจ๏ธ

Press Alt to display Key Tips, press H for the Home tab, then follow the letters shown on screen through Format to AutoFit Row Height. The on-screen letters are the reliable guide for your version.

๐Ÿ–ฑ๏ธ

Double-click the boundary below the row heading. Excel resizes that row to fit its contents.

๐Ÿ“‹

Click Select All, then double-click the boundary below any row heading. Microsoft describes this as the quick way to autofit all rows on the worksheet.

๐Ÿค–

Open the VBA editor with Alt+F11, then run Rows.AutoFit or Range("A1:A500").EntireRow.AutoFit. Useful for automated workflows and after-paste cleanup.

Walking through AutoFit Row Height step by step removes most of the confusion users feel when wrap text behaves unexpectedly. Start by selecting the rows that need resizing. Click a row number in the gray header column on the left, or drag across multiple row numbers to select a contiguous range. Clicking Select All at the top-left corner selects every row, so you can AutoFit the entire sheet in one operation.

With rows selected, go to Home > Cells > Format. Under Cell Size, select AutoFit Row Height. Every selected row resizes to fit its contents, whether that is wrapped text, a large font, or a manual line break.

The Key Tips route reaches the same command from the keyboard. Press Alt to display the Key Tips, then press H to open the Home tab, as Microsoft's own example shows. Follow the letters displayed on screen through Format to AutoFit Row Height. The letters you see are the authoritative sequence for your Excel version.

Double-clicking is the quickest single-row method. Move the cursor to the boundary below the row heading until it changes shape, then double-click, and the row fits its contents. For every row on the worksheet, click Select All and double-click the boundary below one of the row headings.

The Row Height dialog offers a different path. Select rows, go to Home > Format > Row Height, and type a value. That is manual resizing rather than AutoFit, but it is the right tool when you need every row at one identical height, or for merged cells where AutoFit cannot be used.

Knowing which method to choose depends on the situation. Single-row fixes use double-click. Bulk worksheet cleanup uses Select All followed by a double-click or Format, AutoFit Row Height. Repetitive workflows use VBA macros. The result is the same: Excel sizes each row to its content. Practicing core operations like this with structured Excel practice questions builds recall speed.

One subtlety worth knowing: AutoFit applies to rows individually. If row 5 contains four lines of wrapped text and row 6 contains one line, AutoFit gives row 5 a tall height and row 6 a shorter one. If you need uniform row heights across a range, use Row Height (the manual dialog) and enter a single value that accommodates your tallest expected content.

AutoFit Row Height Reference

This table lists the AutoFit facts documented by Microsoft.

TaskVerified methodNotes
AutoFit selected rowsHome > Cells > Format > Cell Size > AutoFit Row HeightExcel for Microsoft 365, 2024, 2021, 2019, 2016
AutoFit one rowDouble-click the boundary below the row headingFits the row to its contents
AutoFit every rowSelect All, then double-click a row boundaryMicrosoft quick tip
Set an exact heightHome > Format > Row Height, type points, OKManual, not AutoFit
Mac exact heightFormat menu > Row > HeightExcel for Mac
Default height15 pointsMinimum 0 hides the row
Maximum height409 pointsExcel specifications and limits
Merged cellsAutoFit cannot be usedSet the height manually
Wrapped text cut offApply AutoFit Row Height or set height manuallyWrap Text article
VBARange.AutoFit on a row or range of rowsErrors on other ranges

Sources: Change the column width or row height, Excel specifications and limits, AutoFit and merged cells, Wrap text, and Range.AutoFit (VBA).

Microsoft Excel Practice Test Questions

Prepare for the Microsoft Excel exam with our free practice test modules. Each quiz covers key topics to help you pass on your first try.

Microsoft Excel Excel Basic and Advance
Microsoft Excel Exam Questions covering Excel Basic and Advance. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Excel Formulas
Free Microsoft Excel Practice Test featuring Excel Formulas. Improve your Microsoft Excel Exam score with mock test prep.
Microsoft Excel Excel Functions
Microsoft Excel Mock Exam on Excel Functions. Microsoft Excel Study Guide questions to pass on your first try.
Microsoft Excel Excel MCQ
Microsoft Excel Test Prep for Excel MCQ. Practice Microsoft Excel Quiz questions and boost your score.
Microsoft Excel Excel
Microsoft Excel Questions and Answers on Excel. Free Microsoft Excel practice for exam readiness.
Microsoft Excel Excel Trivia
Microsoft Excel Mock Test covering Excel Trivia. Online Microsoft Excel Test practice with instant feedback.
Microsoft Excel Advanced Data Analysis Tools
Free Microsoft Excel Quiz on Advanced Data Analysis Tools. Microsoft Excel Exam prep questions with detailed explanations.
Microsoft Excel Advanced Formula and Macro...
Microsoft Excel Practice Questions for Advanced Formula and Macro Creation. Build confidence for your Microsoft Excel certification exam.
Microsoft Excel Advanced Formulas and Macros
Microsoft Excel Test Online for Advanced Formulas and Macros. Free practice with instant results and feedback.
Microsoft Excel Basic and Advance Question...
Microsoft Excel Study Material on Basic and Advance Questions and Answers. Prepare effectively with real exam-style questions.
Microsoft Excel Creating and Managing Charts
Free Microsoft Excel Test covering Creating and Managing Charts. Practice and track your Microsoft Excel exam readiness.
Microsoft Excel Data Visualization with Ch...
Microsoft Excel Exam Questions covering Data Visualization with Charts. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Formulas and Functions
Free Microsoft Excel Practice Test featuring Formulas and Functions. Improve your Microsoft Excel Exam score with mock test prep.
Microsoft Excel Formulas and Functions App...
Microsoft Excel Mock Exam on Formulas and Functions Application. Microsoft Excel Study Guide questions to pass on your first try.
Microsoft Excel Formulas Questions and Ans...
Microsoft Excel Test Prep for Formulas Questions and Answers. Practice Microsoft Excel Quiz questions and boost your score.
Microsoft Excel Functions Questions and An...
Microsoft Excel Questions and Answers on Functions Questions and Answers. Free Microsoft Excel practice for exam readiness.
Microsoft Excel Managing Data Cells and Ra...
Microsoft Excel Mock Test covering Managing Data Cells and Ranges. Online Microsoft Excel Test practice with instant feedback.
Microsoft Excel Managing Tables and Data
Free Microsoft Excel Quiz on Managing Tables and Data. Microsoft Excel Exam prep questions with detailed explanations.
Microsoft Excel Managing Tables and Table ...
Microsoft Excel Practice Questions for Managing Tables and Table Data. Build confidence for your Microsoft Excel certification exam.
Microsoft Excel Managing Worksheets and Wo...
Microsoft Excel Test Online for Managing Worksheets and Workbooks. Free practice with instant results and feedback.
Microsoft Excel MCQ Questions and Answers
Microsoft Excel Study Material on MCQ Questions and Answers. Prepare effectively with real exam-style questions.
Microsoft Excel Questions and Answers
Free Microsoft Excel Test covering Questions and Answers. Practice and track your Microsoft Excel exam readiness.
Microsoft Excel Trivia Questions and Answers
Microsoft Excel Exam Questions covering Trivia Questions and Answers. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Workbook and Worksheet Man...
Free Microsoft Excel Practice Test featuring Workbook and Worksheet Management. Improve your Microsoft Excel Exam score with mock test prep.

AutoFit Row Height on Windows and Mac

๐Ÿ“‹ Windows Desktop

Microsoft documents AutoFit Row Height for Excel for Microsoft 365, 2024, 2021, 2019, and 2016. The ribbon path is Home โ†’ Cells โ†’ Format โ†’ Cell Size โ†’ AutoFit Row Height. Double-clicking the boundary below a row heading fits a single row, and Select All plus a double-click fits every row.

VBA support is complete on Windows: Rows.AutoFit, Selection.EntireRow.AutoFit, and Range("A1:A100").EntireRow.AutoFit all size rows to their contents. The Range.AutoFit method must be called on a row or range of rows, otherwise Excel raises an error.

๐Ÿ“‹ macOS Desktop

In Excel for Mac, double-click the separator beneath a row heading to fit the row to its contents. To type an exact value, choose Format from the menu bar, point to Row, and click Height. Select several row headings first to change more than one row, or use the Select All triangle to resize every row.

Microsoft's Mac instructions cover Excel for Microsoft 365 for Mac, Excel 2024, and Excel 2021 for Mac.

AutoFit Row Height: When to Use It and When to Avoid It

Pros

  • Resizes rows to fit content without manual dragging
  • Handles wrapped text, line breaks, and large fonts
  • Works on a single row or the whole worksheet with Select All
  • Available via ribbon, double-click, Key Tips, and VBA

Cons

  • Cannot be used on rows that contain merged cells
  • Sizes each row separately, so uniform heights need a typed Row Height value
  • Limited by the 409-point maximum row height

Auto Row Height Pre-Flight Checklist

Confirm Wrap Text is enabled on cells where content should wrap to multiple lines
Unmerge merged cells or set their heights manually, since AutoFit cannot be used on them
Select all target rows before triggering AutoFit, not just a single cell
Check that no exact row height was typed after the last AutoFit
Confirm the worksheet is not protected against formatting changes
Re-run AutoFit after you paste or import new content into the range
Combine Select-All with AutoFit for instant whole-sheet cleanup
Click Select All at the top-left corner of the worksheet, then double-click the boundary below any row heading. Microsoft describes this as the quick way to autofit every row on the worksheet. It is a fast cleanup pattern after pasting from PDF or web sources.

When AutoFit Row Height refuses to work, the cause is usually one of a few conditions. Merged cells are the most common culprit. Microsoft states that you cannot use AutoFit on a row or column that contains merged cells, and that you must set those heights manually through the Format menu.

Wrap Text is the second thing to check. Microsoft's wrap-text article explains that when wrapped text is not fully visible, you can apply Home > Format > AutoFit Row Height or set the height manually. A cell with Wrap Text off keeps its text on one line, so it never needs a taller row.

Exact heights are the third cause. If someone typed a value in the Row Height dialog, the row keeps that height until you run AutoFit Row Height again or type a new value.

Protection is the fourth. A worksheet protected through Review > Protect Sheet allows only the actions its author ticked, so formatting commands may be unavailable. Unprotect the sheet, run AutoFit, then reapply protection.

Finally, remember the limit: no row can exceed 409 points, so extremely long wrapped content will be cut off even after AutoFit. Widen the column, shorten the text, or reduce the font size. Several practice scenarios for this kind of debugging appear in advanced Excel functions question banks, which help build diagnostic instincts.

VBA opens the door to automation patterns that make AutoFit Row Height feel built-in to your workflow. The simplest macro is one line: Rows.AutoFit applies the Range.AutoFit method to every row on the active worksheet. Open the VBA editor with Alt+F11, insert a new module, paste Sub AutoFitAll() then a line with Cells.EntireRow.AutoFit followed by End Sub, and you have a reusable macro. Microsoft notes the Range object must be a row or range of rows, or a column or range of columns, otherwise the method generates an error.

More precise control comes from targeting specific ranges. Range("A1:A500").EntireRow.AutoFit fits only the first 500 rows. Sheets("Data").Rows.AutoFit fits every row on a sheet named Data, even if it is not the active sheet. For multi-sheet workbooks, a For Each loop over Worksheets can call AutoFit on each sheet.

Event-driven AutoFit is possible too. The Worksheet_Change event fires when cells are edited, and Target.EntireRow.AutoFit inside the handler re-fits the affected row. Test it on a copy first and limit it to specific columns, because an event handler that runs on every change can slow a large worksheet.

Error handling matters in production macros. Chart sheets or other sheets that cannot be resized will raise errors in a Worksheets loop, so wrap AutoFit calls in error handling that logs the sheet and continues. Working through formula-focused practice problems builds intuition for similar defensive patterns in calculation logic.

Practice Excel Formulas and Formatting Questions

Practical AutoFit habits develop with repetition. The first habit is running AutoFit immediately after every paste operation. CSV imports, web copy-pastes, and content from email all bring inconsistent formatting, and Select All followed by a double-click on a row boundary fits every row in one step. The second habit is enabling Wrap Text on text-heavy columns before you AutoFit, because AutoFit only has more than one line to measure when text wraps.

Set column widths intentionally before applying AutoFit Row Height. If columns are too narrow, text wraps into more lines than necessary and produces oversized rows. Widen text columns first, enable Wrap Text, then AutoFit Row Height. Microsoft notes that wrapped data adjusts automatically when you change the column width, so the order matters.

Remember the fallback: when you need every row at one identical height, or when merged cells block AutoFit, type an exact value in Home > Format > Row Height instead. Manual heights are fine for fixed-format reports. Use AutoFit for content-driven layouts and let the numbers decide, then save the workbook once the heights look right.

Excel Questions and Answers

Why does Excel AutoFit row height not work?

The most common cause is merged cells: Microsoft states AutoFit cannot be used on rows or columns that contain merged cells, so set those heights manually with Home, Format, Row Height. For ordinary text, make sure Wrap Text is on, since a single unwrapped line never needs a taller row. Also check that the sheet is not protected against formatting changes.

What is the keyboard route to AutoFit Row Height?

Microsoft's Excel shortcut list does not include a dedicated AutoFit key, but Key Tips reach the same command. Press Alt to display Key Tips, press H for the Home tab, then follow the letters shown on screen through Format to AutoFit Row Height. Use the letters on your own screen as the guide, since ribbon layouts vary between versions.

How do I AutoFit every row on a sheet?

Click Select All, the triangle at the top-left corner where the row numbers and column letters meet, then double-click the boundary below any row heading. Microsoft describes this as the quick way to autofit all rows. You can also select the rows and choose Home, Format, AutoFit Row Height. Each row then fits its own contents.

Why does AutoFit make a row taller than I expected?

AutoFit sizes a row to fit its contents, so the tallest cell sets the height. One cell with a large font, a long wrapped paragraph, or many manual line breaks (Alt+Enter on Windows) makes the whole row grow. Find that cell, shorten or reformat it, then run AutoFit Row Height again. Rows cannot exceed the 409-point maximum, however tall the content is.

Can VBA AutoFit rows automatically?

Yes. The Range.AutoFit method sizes rows in a range to their contents, and it must be called on a row or range of rows. Placing Target.EntireRow.AutoFit inside a Worksheet_Change event handler re-fits a row whenever its cells are edited. Test this on a copy first, because an event handler runs on every change and can slow large worksheets.

What is the maximum row height in Excel?

The maximum row height in Excel is 409 points, according to Microsoft's specifications and limits page. The minimum is 0, which hides the row. If AutoFit would need more than 409 points, the row stops at the limit and some content stays hidden. Widen the column, shorten the text, or reduce the font size so the content fits within the limit.

What is the difference between AutoFit Row Height and Row Height?

AutoFit Row Height sizes a row to fit its contents, while Row Height opens a dialog where you type an exact value in points. Both are under Home, Cells, Format, Cell Size. Use AutoFit for content-driven layouts and wrapped text. Use Row Height when you need identical heights, or for merged cells, where Microsoft says AutoFit cannot be used.

How do I AutoFit a row on Mac?

Double-click the separator underneath the row heading, and Excel adjusts that row to fit its contents. Microsoft's Mac instructions also cover the Format menu, where Row and then Height let you type an exact value, and the Select All triangle to resize every row. Select several row headings first if you want to change more than one row at a time.
โ–ถ Start Quiz