+ Reply to Thread
Results 1 to 2 of 2

Autofit Rows within Table

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    Autofit Rows within Table

    Hello,

    I have a spreadsheet, unfortunately I cannot share the file (I know this may make this a little more complicated), where I have used a table from 'Table Styles' and record information.

    I have a VBA so that certain tasks are carried out when I save the file; removing filters, hidding columns, setting widths.

    I am trying to 'autofit' the rows and most work but every now and then a row doesn't autofit and two lines are squeezed into row height for single line. All cells are set to 'wrap text' through cell formatting, not through VBA coding.

    This is the code that I am using for the sheet;
    Please Login or Register  to view this content.
    Can anyone help. I have tried searching for a way of looking at the number of lines in the row and setting the row height based on that.

    Thank you.

  2. #2
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Autofit Rows within Table

    I do know that if a row has merged cells for more than one column where "alt-Return" is used to create two lines, i.e., A2 and B2 are merged and the text has been split into two paragraphs with "alt-Return", then it will not auto-fit. Also, if a cell has a custom format longer than the cell it will not auto-fit that row

+ 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] Can I determine the effect of autofit to .columnwidth prior to executing the autofit?
    By kadeo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-13-2016, 10:29 AM
  2. AutoFit table in Word
    By Boz1972 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2016, 10:51 AM
  3. Autofit Merged Rows
    By Jason82 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2010, 12:07 AM
  4. [SOLVED] autofit whole table?
    By Lobo in forum Excel General
    Replies: 3
    Last Post: 06-17-2006, 12:00 AM
  5. AutoFit rows issue
    By stego in forum Excel General
    Replies: 0
    Last Post: 02-28-2006, 05:45 PM
  6. [SOLVED] can't format rows to autofit
    By jbf in forum Excel General
    Replies: 2
    Last Post: 01-21-2006, 08:00 PM
  7. Wordwrap and AutoFit Rows
    By LavaDude in forum Excel General
    Replies: 1
    Last Post: 07-15-2005, 11:05 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