+ Reply to Thread
Results 1 to 7 of 7

Merged Cells/ Word Wrapping and Autoheight

  1. #1
    Registered User
    Join Date
    12-28-2010
    Location
    Portsmouth Va
    MS-Off Ver
    Excel 2007
    Posts
    2

    Merged Cells/ Word Wrapping and Autoheight

    I'm using Excel 2007, and am running into a formatting issue.

    Lets say I have merged cells A2, A3, A4 & A5. I have also set the text to wrap, and set the row to Autoheight.

    My problem is the merged cell does not automatically adjust in height. The text does wrap properly, and I can manually adjust the row height to display the text properly. If I unmerge the cells, the information in A2 does Wrap and AutoHeight correctly.

    This has something to do with the merging of the cells.

    I can take contents of the merged cell and place the value in another cell. Lets say in cell A10, I use a formula "=A2", if the cell width is set to the same as the merged cells it will format correctly. By that I mean cell A10 will wordwrap and Autoheight correctly, and with the height of the row changing, Now cell A2 display correctly. This is my current work around.

    Any thoughts would be appreciated

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Merged Cells/ Word Wrapping and Autoheight

    I would avoid merging cells, they generally cause problems
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-28-2010
    Location
    Portsmouth Va
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Merged Cells/ Word Wrapping and Autoheight

    Quote Originally Posted by royUK View Post
    I would avoid merging cells, they generally cause problems
    I generally do avoid merged cells for anything other than "Static display" or formula style information. In this particular spreadsheet, I need the merging so my printed output looks correct for non-users. But I also need alot of flexibility in the document to enter many types of values, Also the 3 cells C3 - E3, determine where the costs for the item is placed on a summary sheet.

    I have attached a portion of the worksheet in question.

    Any ideas on other design methods to achieve a similar result?

    These worksheets do not get very large, seldom more than 500 lines. Is there a way with VBA/Macros to look at Cell B4 and determine what the needed cell height is based upon Text Length/Cell Width, and change the row height to match it? Maybe link to an OnChange event related to cell B4?

    I know I would have to consider font size, and calculate # of pixels ect, just need ideas of a direction to procede.

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Merged Cells/ Word Wrapping and Autoheight

    unmerge cells
    then try selecting b4:e4
    format cells alignment horizontal centre across selection
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Merged Cells/ Word Wrapping and Autoheight

    In the alternative,

    In P2 and down, =B4 and format col P to wrap text.

    Make the width of col P the same as the total width of cols B/C/D/E

    Col P will serve to adjust the row height. It may not be perfect.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    08-15-2013
    Location
    Lugano, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Merged Cells/ Word Wrapping and Autoheight

    Hello everyone,

    I am having the same problem as woodguy23321. I have Excel 2010.
    I have a Print template with merged cells, the merged cell gets its content from "=statement!B2". Due to its rather complex formating it is not possible to unmerge the cell, it would ruin the Print layout.
    Is there really no way to adjust automatically the hight of a merged cell/row to its content?
    Any help on this issue would be greatly appreciated.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Merged Cells/ Word Wrapping and Autoheight

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1