Results 1 to 3 of 3

Row height will not resize automatically to fit wrapped text

This is a discussion on Row height will not resize automatically to fit wrapped text within the Excel Questions forums, part of the Question Forums category; I have looked and looked for an answer that helps me, but not found it worded quite the way I ...

  1. #1
    New Member
    Join Date
    Dec 2007
    Posts
    13

    Default Row height will not resize automatically to fit wrapped text

    I have looked and looked for an answer that helps me, but not found it worded quite the way I need it. I am using Excel 2007.

    I have a formula in a cell that returns text from multiple cells and inserts a carriage return in between the contents from each cell. Let's use this as an example:

    A1 has 20 characters of text
    A2 has 10 characters of text
    A3 has 40 characters of text
    A4 has the formula =a1&CHAR(10)&a2&char(10)&a3
    The width of column A fits 20 characters. All cells in column A have been formatted to wrap text. No cells are merged.

    I would expect cell A4 to show 4 lines of text:
    A1 content in line 1 of cell A4 followed by a carriage return
    A2 content in line 2 of cell A4 followed by a carriage return
    A3 content in lines 3 and 4 of cell A4; the first 20 characters of A3 content should appear in line 3 and the last 20 characters should appear in line 4. There is no carriage return - the split occurs because the cell is formatted to wrap text and the cell width only fits 20 characters.

    This is a simplified example. The reality is I have multiple cells like A4, with varying content lengths (all under the limit able to be displayed in a cell). Some of these cells have enough content to fit on one line at the given width while others require multiple lines to fit the content.

    The problem is that row height will not always adjust for me automatically. Its behavior seems inconsistent, though I'm sure it must be something I've done or am doing wrong. Ultimately, I'd like the row height to adjust automatically to the content I'm trying to display. I'd like it to adjust automatically if I narrow or widen the column width as well. I'd really prefer not to use VBA/macros if possible, as I'm a relative novice at them.

    I get these two types of problems - I'd like help with both, but particularly the second one:
    • First, sometimes there will be blank space at the top of the cell showing the content (the cell is formatted for bottom alignment). This seems to happen if I widen a column containing a cell with wrapped text. To fix it, I edit the cell without changing anything (hit F2 and then enter), and the row height usually adjusts. But this doesn't always work - then I try formatting the cell to AutoFit Row Height. Is there an easier way to fix this issue?
    • Second, sometimes the row height does not adjust to display all the text. I've tried re-formatting the cell to turn off wrapping, then turn it back on again and that doesn't work. I've also tried formatting the cell to AutoFit Row Height and that doesn't work either. How can I fix this issue?


    The only solution seems to be manually adjusting the row height, but I suspect that doing that will "break" the automatic row height sizing and I'll have to manually adjust the row height every time the text or the column width changes. I've read that once I adjust the row height myself, it throws everything off. I'm not sure if formatting the cell to "AutoFit Row Height" is the same as formatting the cell to a specific height or using the mouse to make the column height change. I'm also not sure if once I've adjusted the row height myself, whether "undoing" the change is the same as if it's never happened. I am sure that it's driving me crazy though. Word-wrapping and row-height issues have caused me problems in the past that have caused me to use Word instead of Excel for certain documents and I'd love to figure this out once and for all.

  2. #2
    Board Regular
    Join Date
    Feb 2003
    Location
    Luton, England.
    Posts
    8,110

    Default Re: Row height will not resize automatically to fit wrapped text

    I can only suggest that you try menu Format\Rows\Autofit
    Regards
    BrianB (using XL2003 & 2010)
    Most problems occur from starting at the wrong place.
    Use a cup of coffee to speed up all Windows processes.
    It is easy until you know how.
    **FORMATTED/COMMENTED CODE IS MORE LIKELY TO GET A REPLY

  3. #3
    New Member
    Join Date
    Dec 2007
    Posts
    13

    Default Re: Row height will not resize automatically to fit wrapped text

    Thanks, Brian, I know that works sometimes, but it is not working in this case.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com