Excel Row Height Shortcut: Set or AutoFit Rows

How-to basics · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, press Alt, H, O, H in sequence to open the Row Height dialog, enter a number, and press Enter. To fit a row to its contents instead, use Alt, H, O, A for AutoFit Row Height.

The Windows shortcut and what it does

The key sequence Alt, H, O, H is a set of Ribbon KeyTips, not four keys to hold down together. Press and release Alt, then press the letters one at a time. Excel opens the Row Height box for the selected row or rows. Enter a height in points and confirm with Enter; choose Cancel or press Esc if you do not want to apply a change.

The sequence follows Excel’s Home-tab commands: Home > Format > Row Height. If KeyTips do not appear as expected, use that Ribbon path instead. KeyTips can differ when Excel’s display language or Ribbon layout differs, and some keyboard configurations may require an extra key to produce a letter. The menu command has the same effect as the shortcut.

There is a useful distinction between setting a specific height and fitting a row to its contents. Row Height applies one chosen measurement. AutoFit calculates enough height for visible cell content, subject to Excel’s layout behavior. These commands are related, but one does not simply open the other.

How to change the height of one or more rows

First select the row or rows you want to change. You can click a row number at the left edge of the worksheet, drag across several row numbers, or click one row number and Shift-click another to select a continuous range. Then use Alt, H, O, H, type a height, and press Enter.

You can also select a cell in a row and use the command; Excel applies the setting to that cell’s row. Selecting row headers first is often clearer, especially when the goal is to give a group of rows exactly the same height. For example, select rows 4 through 12 and enter 24 to make all nine rows 24 points high. This does not change column widths or the contents of the cells.

  • One row: click its row number, then open Row Height.
  • Adjacent rows: select the first row number and extend the selection through the last.
  • Separate rows: hold Ctrl while selecting additional row headers, then apply the setting to the selection.

To select an entire row from the keyboard on Windows, click a cell in that row and press Shift+Space. Check that the intended rows are highlighted before entering a value; an accidental selection can make a formatting change appear to affect the wrong part of the sheet.

Set a fixed height or use AutoFit

Choose a fixed height when rows should look consistent, such as in a printed form, a template, or a compact data table. Choose AutoFit when text varies in length and the row should expand only as much as needed. The AutoFit sequence is Alt, H, O, A, or use Home > Format > AutoFit Row Height.

For example, a short label in a row may fit at the standard height, while a long note with Wrap Text enabled may occupy three lines. AutoFit can enlarge the row to show those lines. If you later edit the note or change the column width, run AutoFit again if the displayed text no longer fits. A manually chosen height is not a promise that every future edit will remain visible.

To apply AutoFit to several rows, select them first and then run the command. If you select the whole worksheet, AutoFit can affect many rows at once, which may be slower or create an unexpectedly uneven sheet. For a controlled result, select only the relevant range. You can also double-click the boundary below a row number to AutoFit that row; this is a mouse alternative, not a keyboard shortcut.

Row height units and sensible values

Excel measures row height in points, a typographic unit; 72 points equal one inch. The number in the Row Height dialog is therefore not a pixel count. On-screen pixels can vary with display scaling, zoom, and the monitor, so a row that looks a certain number of pixels tall on one screen may look different elsewhere. For printed layouts, use Print Preview to check the result rather than relying only on the worksheet view.

A new worksheet commonly starts with rows around 15 points high, though the default can vary with workbook settings and font metrics. The actual height needed to display a line depends on the font and its size. A height such as 24 points is a practical starting point for a roomier single-line row, but it is not a universal fit for every font, device, or workbook. Excel supports row heights up to 409 points; if content needs more space, consider wrapping text, widening the column, or splitting the content across rows.

Entering a larger number does not enlarge the text itself; it adds vertical space around the cell contents. To change text size, use the font-size control on the Home tab. Conversely, making a row shorter does not delete content, though it can hide some of the displayed text until the row is enlarged or the content is otherwise made visible.

Wrapped text, merged cells, and visible content

When a cell contains a long sentence, widening its column may keep it on one line. If the column should stay narrow, select the cell and choose Home > Wrap Text, then use AutoFit Row Height. The row can grow to show multiple lines. A manual height may instead show only part of the wrapped content, so if text appears cut off, check both the row height and the Wrap Text setting.

Merged cells need special care. AutoFit may not correctly calculate the required height for text in a merged range, because the content spans multiple cells rather than sitting in a single ordinary cell. If the row remains too short, set its height manually and inspect the result. Where possible, avoid merging cells in data tables; alternatives such as Center Across Selection can preserve a more predictable grid layout.

Also distinguish hidden content from hidden rows. If a row is hidden, changing its height may not make it visible; use the row headers to unhide it. If a filter hides records, those filtered-out rows are not displayed until the filter is cleared or changed. A row-height command is a formatting action, not a way to reveal filtered records or unhide rows.

Excel on Mac and Excel for the web

The Windows KeyTip sequence Alt, H, O, H is not a dependable Mac shortcut. In Excel for Mac, select the rows and use the macOS menu command Format > Row > Height to enter a fixed value. For automatic sizing, use Format > Row > AutoFit where available in the Mac version, or use the relevant Format controls in the Ribbon. Mac keyboard shortcuts can differ by version and keyboard setup, so do not assume the Windows Alt sequence will work there.

In Excel for the web, use the Home tab’s Format controls to find the row-height or AutoFit command; available controls and KeyTips can vary with the browser and interface updates. If a shortcut is intercepted by the browser or does not match desktop Excel, use the Ribbon. The underlying idea is the same: select the rows first, then choose a fixed height or AutoFit.

Common problems and quick fixes

If the shortcut seems to do nothing, make sure you are pressing the KeyTips one after another rather than holding all four keys. Verify that the worksheet is active and that Excel is not still editing a cell. Press Esc to leave cell-edit mode, then try again. If the letters differ from the sequence described, open the Home tab and follow the visible Format menu; localized versions may show different KeyTips.

  • Text is still cut off: turn on Wrap Text if appropriate, then run AutoFit; check for merged cells and manual height limits.
  • Rows look uneven: select the relevant rows and enter one fixed height rather than AutoFit.
  • The wrong rows changed: undo with Ctrl+Z, select the intended row headers, and repeat.
  • Nothing becomes visible: check whether the row is hidden or filtered instead of merely short.
  • The row is too tall after AutoFit: inspect long text, line breaks, wrapping, and column width; then choose a deliberate fixed height if needed.

Undo generally reverses a recent row-height change, provided no intervening action has displaced it in the undo history. This is a useful safeguard, but it is still best to check the selection before applying formatting across a large range.

Choosing the right method for the task

Use the fixed-height shortcut when uniformity matters; use AutoFit when accommodating different amounts of text matters. For a simple list with short entries, keeping the default height is often the cleanest option. For a notes column, wrapping plus AutoFit can improve readability, but it may make a worksheet much taller. For a report that must fit on a page, fixed heights can help with layout, although printer scaling and margins also affect pagination.

There are also mouse-based alternatives: drag the boundary beneath a row number to resize it, or double-click that boundary to AutoFit. Dragging is convenient for visual adjustments, while the dialog is more precise and lets several selected rows share the same value. Neither method changes the cell’s font, column width, or stored data.

Frequently Asked Questions

What is the shortcut for row height in Excel?
In Excel for Microsoft 365 on Windows, press Alt, H, O, H in sequence to open the Row Height dialog. Enter a value in points and press Enter.

What is the shortcut to AutoFit row height?
On Windows, press Alt, H, O, A in sequence. This fits the selected rows to their contents when Excel can calculate the required height.

Can I change the height of multiple rows at once?
Yes. Select the row headers you want to format, then use the Row Height shortcut and enter one value. Every selected row receives that height.

Why does AutoFit not show all text in a merged cell?
Excel may not AutoFit merged cells reliably. Set the row height manually, check the result, or redesign the layout to avoid merging where practical.

What is the Mac shortcut for row height?
The Windows Alt KeyTip sequence is not a reliable Mac equivalent. In Excel for Mac, select the rows and use Format > Row > Height; the exact Ribbon presentation can vary by version.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.