+ Reply to Thread
Results 1 to 17 of 17

AutoFit Row Height function not working with merged cells

  1. #1
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    AutoFit Row Height function not working with merged cells

    AutoFit Row Height function not working with merged cells

    I have created a spreadsheet with some cells that are merged together (in the same row).
    When I use the AutoFit Row Height function with that row with the merged cells, it does not work properly. It ignores the merged cells and seems to base the auto fit off the other cells that are not merged. The problem for me with this is the merged cells have lots more data in them and they no longer display the entire cell like I want them to do.

    When I use AutoFit Row I would like them to take the merge cells into consideration.

    Is this possible to do or is this an issue that I am going to have to live with?

    Any help would greatly be appreciated.

    I have attached two samples.
    Sample #1 is before using the AutoFit Row

    Sample #2 is after using the AutoFit Row

    autofit1.jpg
    autofit2.jpg

  2. #2
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,215

    Re: AutoFit Row Height function not working with merged cells

    In which excel 2003 or 2007. plz upload your file


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  3. #3
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    I am using excel 2010. I have attached the file.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,404

    Re: AutoFit Row Height function not working with merged cells

    Unfortunately, this is 'by design'. Excel ignores merged cells when auto-fitting columns or rows.
    There's some VBA code on one of the MS forums which might help, but I haven't tried it so can't guarantee that. Here's the link:
    http://answers.microsoft.com/en-us/m...470d2be?page=1
    There's code on page 2 if your sheet is protected.

    Sorry I can't be of more help.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  5. #5
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by Aardigspook View Post
    Unfortunately, this is 'by design'. Excel ignores merged cells when auto-fitting columns or rows.
    There's some VBA code on one of the MS forums which might help, but I haven't tried it so can't guarantee that. Here's the link:
    http://answers.microsoft.com/en-us/m...470d2be?page=1
    There's code on page 2 if your sheet is protected.

    Sorry I can't be of more help.
    I tried everything in that and could not get it to work. I am not much for macros but I followed the steps and had no luck at all.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: AutoFit Row Height function not working with merged cells

    Unmerge the cells. Select the cells that you want the text to span. Right click on the selection and choose "Format Cells". Click on the Alignment Tab and choose Center Across Selection. Now, click on Format, AutoFit Row Height.

    Center Across Selection is much better than Merge and Center which I feel should be eliminated from Excel due to the problems that it causes.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: AutoFit Row Height function not working with merged cells

    Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile says 2003, but you indicate that you are using 2010.

  8. #8
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by newdoverman View Post
    Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile says 2003, but you indicate that you are using 2010.
    Thank you for pointing that out. I have corrected this.

  9. #9
    Registered User
    Join Date
    03-25-2020
    Location
    135/6B Hòa Hưng, Ward 12, District 10, HCMC
    MS-Off Ver
    2016
    Posts
    1

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by newdoverman View Post
    Unmerge the cells. Select the cells that you want the text to span. Right click on the selection and choose "Format Cells". Click on the Alignment Tab and choose Center Across Selection. Now, click on Format, AutoFit Row Height.

    Center Across Selection is much better than Merge and Center which I feel should be eliminated from Excel due to the problems that it causes.
    -
    Thank you, it's work for me. But this is a little bit difficult if i have many cell like that.
    Hope VBA code can fix this.
    Thanks
    https://khoingo.net/lap-dat-camera-quan-sat/

  10. #10
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by newdoverman View Post
    Unmerge the cells. Select the cells that you want the text to span. Right click on the selection and choose "Format Cells". Click on the Alignment Tab and choose Center Across Selection. Now, click on Format, AutoFit Row Height.

    Center Across Selection is much better than Merge and Center which I feel should be eliminated from Excel due to the problems that it causes.
    I went back and tried this again. I was able to get this working, sort of. The only drawback is that it does a center justify of the text in the blocks. When you have a paragraph it does not look proper. I want it to do a left justify.
    If I could somehow get this to span all blocks but do a left justify that it might work for me.

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: AutoFit Row Height function not working with merged cells

    Hi attroll,

    I went back and tried this again. I was able to get this working, sort of.
    Well, I guess it does help that we are quarantined right now, so getting back to things is easier as we have time now. Over three years though. Anyway, my guess, not many people are going to be attracted to this old thread, so I would suggest you start a new thread with a clear before and after workbook. Why not just get rid of the extra columns? Is there really a need to them!
    HTH
    Regards, Jeff

  12. #12
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    I wish I could get rid of the extra columns but the way I am using the spreadsheet, I can’t.
    I have attached a sample of my spreadsheet and why I have to merge the columns.
    I need columns C, D, and E to merge in some of the rows but not all of them. This way the information is spread out more in the cells that I have merged.
    If I only used column C you can see that cell C 1131 would take up more room, the cell would be narrower and longer.


    excel-ss.jpg

  13. #13
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,215

    Re: AutoFit Row Height function not working with merged cells

    Why you need merged cell. merged is not a good practice. Without merged you can do required result.

  14. #14
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: AutoFit Row Height function not working with merged cells

    Hi avk,

    That is what I already suggested, but the OP needs to create their own thread. Please do not answer this query any further.

    so I would suggest you start a new thread with a clear before and after workbook. Why not just get rid of the extra columns? Is there really a need to them!

  15. #15
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by avk View Post
    Why you need merged cell. merged is not a good practice. Without merged you can do required result.
    avk
    I really don't want to keep the cells merged but as I mentioned that is the only way I can group them.
    I did as "newdoverman" suggested and formatted the three cells to the Center Across Section and that works but I want to center left justification. There is no way to do that with left justification across three cell.
    If you know of a way to do this please explain it to me, please.

    Quote Originally Posted by jeffreybrown View Post
    Hi avk,

    That is what I already suggested, but the OP needs to create their own thread. Please do not answer this query any further.
    khoingosecurity
    I did not want to start a new thread. If I start a new thread, I am going to get the same responses again and have to go into the whole explanation all over again.
    If you would really like me to start a new thread for people offer the similar responses again, I will. I was hoping not to have to.
    Sorry, let me know if you would still like me to create a new thread and I will.

  16. #16
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: AutoFit Row Height function not working with merged cells

    Sure. Go ahead and continue here. Other than this thread is three years old, not sure why I told you to start a new thread. Probably just so you could get more attention in a new thread.

  17. #17
    Registered User
    Join Date
    11-29-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: AutoFit Row Height function not working with merged cells

    Quote Originally Posted by jeffreybrown View Post
    Sure. Go ahead and continue here. Other than this thread is three years old, not sure why I told you to start a new thread. Probably just so you could get more attention in a new thread.
    Thanks Jeff.

    Here is my explanation as to some of the reasons I did not want to create a new thread. I will shut up after this.
    I just did not want to start the whole thing all over again.
    When I do search on VB forums or any other forums, I hate finding dozens of duplicate threads started by the same user.
    I also own sever large VB forums and I personally don't like users creating a duplicate threads that they already started once before. I would rather have them BUMP their thread then create a new thread. But that is just my opinion and how I run my forums.
    I understand that I started the thread three years ago and I know a new thread would bring it to the top of the NEW THREADS listing.
    On the other hand a new post also brings it to the top of the WHAT'S NEW listing.
    Even though this thread was three years old, someone found it and replied to it and the ball started rolling again.

    OK, I'll shut up.
    Thank you for letting me continue the same thread.

+ 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. AutoFit Row Height for merged cells
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2014, 07:03 PM
  2. [SOLVED] Autofit Row Height on Merged Cells
    By Dragman in forum Excel General
    Replies: 0
    Last Post: 11-08-2013, 03:16 PM
  3. Row height using autofit, with no merged cells
    By D.Smith in forum Excel General
    Replies: 1
    Last Post: 07-02-2006, 06:51 AM
  4. [SOLVED] Autofit Row Height of Merged Cells
    By Jon in forum Excel General
    Replies: 3
    Last Post: 08-05-2005, 04:05 PM
  5. Replies: 3
    Last Post: 05-22-2005, 08:06 PM
  6. Make Autofit row height work with merged cells
    By Franketh in forum Excel General
    Replies: 2
    Last Post: 04-06-2005, 06:06 PM
  7. Autofit row height in merged cells
    By BobT in forum Excel General
    Replies: 1
    Last Post: 02-25-2005, 01:06 PM
  8. [SOLVED] Autofit of Row Height with Merged Cells - AGAIN!
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2005, 03:06 PM

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