+ Reply to Thread
Results 1 to 4 of 4

Automatically adjust row height in merged cells (code needs tweaking)

  1. #1
    Registered User
    Join Date
    04-27-2015
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    49

    Automatically adjust row height in merged cells (code needs tweaking)

    Hello Excel Experts

    I have a protected worksheet where I want to automatically adjust row height of merged cells so that whenever you finish entering texts in the cell and leaving the cell, the cell's row height will adjust automatically to accommodate all the texts entered in the cell. Text wrap is turned in selected cells.

    I searched the web and found a few options but this one seemed to do the trick;
    Please Login or Register  to view this content.
    It worked flawlessly only when the cells in a row were not merged

    I kept getting this error anytime the code ran with merged cells (eg merged cell P1:T1). See image below
    rowheightERROR1.png

    Thanks in advance for the help!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Automatically adjust row height in merged cells (code needs tweaking)

    Hi Harry,

    I have not been successful when trying to adjust 'Merged Area Row Height' when Word Wrap is enabled. My efforts always resulted in a few extra blank lines at the bottom of the 'Merged Area'.

    The code in the following thread works well when 'Merged Area' lines do not wrap: http://www.excelforum.com/excel-gene...ic-search.html

    I will try to resurrect this when I have some time, but I can not promise anything.

    Lewis

  3. #3
    Registered User
    Join Date
    04-27-2015
    Location
    Houston, Texas
    MS-Off Ver
    2013
    Posts
    49

    Re: Automatically adjust row height in merged cells (code needs tweaking)

    Thanks Lewis...i appreciate it. Will check out the recommended thread.

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Automatically adjust row height in merged cells (code needs tweaking)

    Hi Harry,

    The same thread now contains an update that can also handle wrapped text in a 'Merged Area'.

    See the file associated with post #5 in http://www.excelforum.com/excel-gene...ml#post4233951

    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA code to adjust row height for searched cells
    By Jeffro2p in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-05-2014, 09:35 PM
  2. Need a tweak to worksheet change code that autofits the row height of merged cells
    By David M. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2014, 01:33 PM
  3. Automatically adjust row height in merged cell
    By jennifersmigla in forum Excel General
    Replies: 0
    Last Post: 03-16-2013, 01:15 PM
  4. Auto adjust Row Height of Merged and Unmerged cells
    By domino21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2012, 09:11 PM
  5. Adjust row height for merged cells
    By mozaic in forum Excel General
    Replies: 6
    Last Post: 11-08-2011, 03:18 AM
  6. Macro to adjust row height to show all text in merged cell
    By joe27 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2011, 06:34 PM
  7. [SOLVED] Automatically Setting Row Height with Merged Cells
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2005, 08:35 PM

Tags for this Thread

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