Loading
Excel.Tips.Net ExcelTips (Menu Interface)

Automatic Row Height for Wrapped Text

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.

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.

Related Tips:

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

 

Leave your own comment:

*Name:
Email:
  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*Text:
*What is 5+3 (To prevent automated submissions and spam.)
 
 
           Commenting Terms

Comments for this tip:

Jim Pritchard    10 Feb 2016, 12:06
Is there a way for merged cells row height to show all the wrapped text?
Luc    04 Feb 2016, 17:14
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.
Rik VDB    07 Dec 2015, 17:52
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.
MarkBur    15 Oct 2015, 04:29
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.
Dain Kistner    23 Jun 2015, 15:44
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.
Steven Fletcher    17 Mar 2015, 22:17
(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
Vicky    05 Mar 2015, 11:38
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.

Keith    26 Nov 2014, 13:01
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.

 
 

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us

 

Advertise with Us

Our Privacy Policy

Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives

 

Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.