Excel Keyboard Shortcuts to Resize Rows and Columns

How-to basics · Updated November 20, 2026

In Excel for Microsoft 365 on Windows, press Alt, H, O, W in sequence to set a column width, or Alt, H, O, H to set a row height. Select the column or row first, enter the size in the dialog box, and press Enter.

Quick answer: the resize shortcuts

These are ribbon Key Tips, so press and release each key in order rather than holding the whole sequence down. The letters open the Home tab’s Format commands; the final letter chooses the sizing command.

  • Set column width: Alt, H, O, W.
  • Set row height: Alt, H, O, H.
  • AutoFit column width: Alt, H, O, I.
  • AutoFit row height: Alt, H, O, A.

The first two commands open a dialog in which you type a measurement. The AutoFit commands instead ask Excel to calculate a suitable size from the visible cell contents. If the sequence does not work, click in the worksheet first, make sure a cell or header is selected, and try again; focus in a browser bar, dialog, or another part of the interface can change what the keys do.

Why Excel resizes rows and columns, not individual cells

People often ask how to resize one cell, but worksheet dimensions are shared. A column width applies to every cell in that column, and a row height applies across the entire row. You cannot make one cell wider than the cells above and below it without changing the column, or make just one cell taller without changing its row.

For a layout that looks like a single larger cell, you can merge adjacent cells, but merging has trade-offs. It can make sorting, filtering, copying, and selecting data more awkward, and merged cells can interfere with AutoFit. For tabular information, it is usually better to adjust the column or row, wrap the text, or let the text overflow into an empty neighboring cell.

Set a precise column width or row height

Use the exact-size shortcuts when consistency matters, such as making several report columns the same width. After selecting the relevant headers or cells, press the matching key sequence, type a value in the dialog, and confirm. Excel applies the specified dimension to the selected rows or columns.

Column width is not a pixel measurement. Excel expresses it approximately in the number of characters of the standard font that fit in the column, so changing the workbook’s default font can affect how a width appears on screen. Row height is measured in points; 72 points equal one inch. As a result, entering the same number for width and height does not create a square cell.

For example, if a worksheet has a short ID column and a long description column, select the ID column and assign a modest width, then select the description column and enter a larger one. To standardize a group of columns, select all their headers before using the width dialog. This is more repeatable than dragging each boundary by eye.

Excel allows a column width up to 255 characters and a row height up to 409 points. Those limits are far larger than most readable layouts need. If a value appears clipped even after increasing the size, check whether the cell contains wrapped text, a merged range, or a display format that changes how the value is shown.

AutoFit to match the contents

AutoFit is the fast choice when you do not need a particular measurement. Select the target columns, then press Alt, H, O, I; Excel adjusts their widths to fit the longest displayed entry. For row height, select the rows and use Alt, H, O, A. This is useful after pasting data or changing font size.

AutoFit considers the cell’s displayed contents, not just the underlying value. A date formatted as a long date may need more room than the same date shown numerically. A formula cell is sized for its displayed result, rather than for the formula text. If a cell’s content is too long for the available space and the neighboring cell is occupied, the value may look cut off; AutoFit can reveal it by widening the column.

When Wrap Text is turned on, a row may need more height to show multiple lines. If the row does not appear to adjust, select it and run AutoFit Row Height. Merged cells are a notable exception: Excel may not calculate the needed height or width for merged content reliably. You may need to set the size manually, unmerge the cells, or redesign the layout.

Select the right rows or columns first

The shortcut changes the dimensions of whatever rows or columns are selected, so selection is important. Click a column letter to select a full column or a row number to select a full row. Drag across adjacent headers to select several. On Windows, Ctrl+Space selects the current column, and Shift+Space selects the current row.

If you select ordinary cells rather than entire headers, Excel can still apply the width or height command to the corresponding whole column or row. Selecting headers makes the effect easier to see and reduces the chance of resizing the wrong part of the sheet. You can select multiple columns or rows and apply one size to all of them, which is useful for aligning a table.

Before resizing, consider whether the selection includes hidden rows or columns. A dimension change does not necessarily make hidden items visible. If a row or column seems to be missing, use the relevant Unhide command from the Home tab’s Format menu, or select the headers around the hidden area and choose Unhide.

Mouse resizing and keyboard resizing compared

Dragging a boundary is convenient for a quick visual adjustment. Move the pointer to the line between two column letters or row numbers; when the resize pointer appears, drag the boundary. Double-clicking that boundary performs AutoFit for the adjacent column or row. If several headers are selected, dragging one boundary can set the selected columns to the same width or selected rows to the same height.

The keyboard is better when you need a repeatable value, want to work without reaching for the mouse, or need to resize a selection precisely. Mouse dragging is more intuitive when you are judging a printed or on-screen layout. A practical workflow is to use AutoFit first, then set an exact width for columns that need consistent alignment.

There is also a useful difference between AutoFit and manually setting a size. AutoFit is based on current contents, so adding a longer entry later may mean running it again. A fixed width stays fixed until you change it, even if new content is clipped or wrapped. Choose based on whether the sheet should adapt to changing data or preserve a deliberate design.

Common problems and ways to fix them

  • The shortcut types letters into a cell: Press Esc, then click a cell or header so the worksheet has focus. Do not start while editing a cell’s contents.
  • The sequence seems ignored: Press and release the keys one at a time. These are sequential Key Tips, not a four-key chord. Check that the workbook is open in desktop Excel for Windows.
  • Text still looks clipped: Try AutoFit, check the number format, and look for occupied neighboring cells or merged cells. If Wrap Text is enabled, AutoFit Row Height may be needed too.
  • Rows or columns do not appear: They may be hidden rather than too small. Use Unhide instead of repeatedly increasing their dimensions.
  • A printout still looks wrong: Cell size and print scaling are separate. Review the worksheet in Print Preview and check page orientation, margins, and scaling options.

A further source of confusion is that changing a cell’s font or applying Wrap Text can alter how much space its contents need, but it does not always resize the row or column automatically. Run the appropriate AutoFit command after formatting if the content is not fully visible. For particularly tall rows or very wide columns, consider whether splitting the content or changing the layout would be easier to read.

Mac and Excel for the web

The Alt sequence above is for Excel on Windows. Excel for Mac uses different keyboard conventions, and shortcuts can also be affected by macOS settings or keyboard layout. A dependable Mac option is to select the row or column and use the ribbon’s Home > Format menu to choose Column Width, Row Height, AutoFit Column Width, or AutoFit Row Height. You can also use the row and column header boundaries with the mouse.

Excel for the web runs in a browser, so some keyboard combinations may be intercepted or altered by the browser or operating system. Select the headers and use Home > Format for the sizing commands, or resize from the headers directly. If you regularly need a precise keyboard sequence, the Windows desktop version is the environment for the Alt Key Tips listed above.

Frequently Asked Questions

What is the shortcut to AutoFit a column in Excel?
In Excel for Microsoft 365 on Windows, select the column or columns and press Alt, H, O, I in sequence. Excel adjusts the width to fit the displayed contents.

What is the shortcut to AutoFit row height?
Select the row or rows and press Alt, H, O, A in sequence on Windows. If a row contains merged cells, the result may not fit the content correctly.

Can I resize only one cell in Excel?
Not independently: width belongs to a whole column and height belongs to a whole row. You can change the row or column, wrap the text, or merge cells for a visual effect, though merging can complicate data operations.

How do I make several columns the same width?
Select all the column headers, press Alt, H, O, W, enter the desired width, and press Enter. Excel applies the value to each selected column.

Why does AutoFit not show all the text?
Check for merged cells, hidden neighboring content, wrapping, and the cell’s number format. For wrapped text, AutoFit the row as well as the column; for merged content, manually adjust the dimensions or consider unmerging.

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.