Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Automatic Row Height for Wrapped Text.

Automatic Row Height for Wrapped Text

by Allen Wyatt
(last updated January 16, 2014)

8

Jordan formatted some cells in his worksheet to wrap text within them. Even though the text in the cells wraps, Excel won't automatically adjust the row height to show all the wrapped text. Jordan wonders if there is a way to "reset" the row so that Excel will adjust its height based on the text being wrapped within the cells.

By default, when you wrap text within a cell, Excel automatically adjusts row height so that all the text in the cell is visible. There are only two exceptions to this default:

  • The cell in which you are wrapping text is actually merged with another cell.
  • The height of the row in which the cell is located was previously changed.

In Jordan's case, there are no merged cells in the problem row. This leaves us with the second exception—it would appear that the height of the row in which the cell is located was explicitly set before wrapping was turned on in some of the row's cells.

In this case, the solution is simple: Reset the row height. There are actually a couple of ways you can do this. First, you could select the row and then double-click the "boundary" between the row and an adjacent row. With the row selected, take a look at the row header, to the left of column A. This area contains a row number, and the "boundary" you need to double-click is between this row number and the next row number.

It can be a bit tricky to get the mouse pointer in the correct location to do the double-clicking, so an approach I prefer is to select the row and simply choose Format | Row | Autofit. This allows Excel to determine the appropriate row height based on the contents of the row. If a cell in the row has wrapping turned on, then the row height will automatically adjust to display the information in the cell.

You can find additional information about this issue in the Microsoft Knowledge Base:

http://support.microsoft.com/kb/149663

If you have quite a few rows that contain cells with wrapping turned on, and the height of none of the rows is adjusting, then you may be interested in a quick little macro that can do the adjustment for you:

Sub AutofitRows()
    For Each CL In UsedRange
        If CL.WrapText Then CL.Rows.AutoFit
    Next
End Sub

The macro steps through all the cells in a worksheet, and if the cell has wrapping turned on, it sets the AutoFit property of the row in which the cell is located.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10734) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Automatic Row Height for Wrapped Text.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Buttons Don't Stay Put

Excel allows you to easily add all sorts of objects and controls to your workbook. Sometimes, though, those items might ...

Discover More

Determining Columns in a Range

If you need to know the number of columns in a particular range, you can use the COLUMNS worksheet function. This tip ...

Discover More

Copying Form Field Contents

Are you developing a form with Word? In some instances it is advantageous to copy whatever is entered in a form field to ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Adjusting Row Height for a Number of Worksheets

Adjusting the height of a row or range of rows is relatively easy in Excel. How do you adjust the height of those same rows ...

Discover More

Detecting Hidden Rows

Excel allows you to easily hide rows in a worksheet, so their contents are not visible. Figuring out how to detect where ...

Discover More

Automatic Row Height For Merged Cells with Text Wrap

When you have text wrap turned on in a cell, Excel expands the height of the row as you add more text to the cell. When you ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 9?

2016-02-10 12:06:54

Jim Pritchard

Is there a way for merged cells row height to show all the wrapped text?


2016-02-04 17:14:01

Luc

None of these work for the *actual* problem. Folks... read the *title*... it says "Automatic", in other words, WITHOUT intervention. All of your solutions are manual. And RikVDB, your answer will create rows that are wildly higher than they need to be if you're copying the same amount of text into an adjacent non-merged cell. The whole idea of dynamic cell contents means the amount of text cannot be predicted. Sorry folks, this bug has *not* been resolved in 2010. It is still very much alive... and frustrating.


2015-12-07 17:52:14

Rik VDB

Use autofit on the row and for the merged cells put copy in a nonmerged cell which can be in a hidden column.

The text in the merged cell is also copied to the non merged cell and this cell height will be adjusted and thus also the cell height of the merged cell.

Make the nonmerged cell widht a bit smaller than the merged cells.


2015-10-15 04:29:57

MarkBur

This doesn't work at all. The full text still doesn't show. And Autofit makes the cells even smaller rather than making them as big as they need to be.


2015-06-23 15:44:18

Dain Kistner

Possible corollary to exception 4: I have a cell with 1631 characters in it. The row height required to display all lines is around 277; however, the auto-fit feature seems to have a row height limit of 255.
If I manually set the row height to some small number (30), and then choose auto-fit, is *does* expand the height...but only to 255.


2015-03-17 22:17:39

Steven Fletcher

(Using 2010) If you paste deformated text, (where wrap is on and auto row height is on) then Excel will not adjust the row height unless you edit the field (go to the end of the text) and press enter. Otherwise it will not wrap and will not auto adjust the row height


2015-03-05 11:38:03

Vicky

I believe a 4th exception exists.

In Excel 2007, if the cell contains large text, like more than 1300 characters, autofit cuts off the last few lines.

The problem goes away in Excel 2010.


2014-11-26 13:01:46

Keith

I believe a 3rd exception exists - when the contents of the cell are calculated using a concatenate function. Excel's autofit does not detect that the cell changed and resize the entire row.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.