PC Review


Reply
Thread Tools Rate Thread

AutoFit Visible Rows

 
 
Sisilla
Guest
Posts: n/a
 
      18th Oct 2006
Hello All,

I would like to resize the rows to AutoFit the data when some columns
are hidden on my worksheet. (Some columns contain cells with a lot more
line breaks than others and cause the associated rows to be quite tall.
When these columns are hidden I would like the rows to be resized to
fit the cells without line breaks.)

SpecialCells(xlCellTypeVisible).Rows.AutoFit

resizes the rows to the tallest cell in the row whether that cell's
column has been hidden or not.

Is there any way to do what I am trying to do? I appreciate any help.

Thanks!
Sisilla

 
Reply With Quote
 
 
 
 
Sisilla
Guest
Posts: n/a
 
      18th Oct 2006
Bump

Sisilla wrote:
> Hello All,
>
> I would like to resize the rows to AutoFit the data when some columns
> are hidden on my worksheet. (Some columns contain cells with a lot more
> line breaks than others and cause the associated rows to be quite tall.
> When these columns are hidden I would like the rows to be resized to
> fit the cells without line breaks.)
>
> SpecialCells(xlCellTypeVisible).Rows.AutoFit
>
> resizes the rows to the tallest cell in the row whether that cell's
> column has been hidden or not.
>
> Is there any way to do what I am trying to do? I appreciate any help.
>
> Thanks!
> Sisilla


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      18th Oct 2006
You could copy the visible cells to a new temporary worksheet and autofit
there. Then use those rowheights to adjust the original row heights.

Sisilla wrote:
>
> Hello All,
>
> I would like to resize the rows to AutoFit the data when some columns
> are hidden on my worksheet. (Some columns contain cells with a lot more
> line breaks than others and cause the associated rows to be quite tall.
> When these columns are hidden I would like the rows to be resized to
> fit the cells without line breaks.)
>
> SpecialCells(xlCellTypeVisible).Rows.AutoFit
>
> resizes the rows to the tallest cell in the row whether that cell's
> column has been hidden or not.
>
> Is there any way to do what I am trying to do? I appreciate any help.
>
> Thanks!
> Sisilla


--

Dave Peterson
 
Reply With Quote
 
Sisilla
Guest
Posts: n/a
 
      19th Oct 2006
Great idea, Dave! I'll try it out. Thanks!

Dave Peterson wrote:
> You could copy the visible cells to a new temporary worksheet and autofit
> there. Then use those rowheights to adjust the original row heights.
>
> Sisilla wrote:
> >
> > Hello All,
> >
> > I would like to resize the rows to AutoFit the data when some columns
> > are hidden on my worksheet. (Some columns contain cells with a lot more
> > line breaks than others and cause the associated rows to be quite tall.
> > When these columns are hidden I would like the rows to be resized to
> > fit the cells without line breaks.)
> >
> > SpecialCells(xlCellTypeVisible).Rows.AutoFit
> >
> > resizes the rows to the tallest cell in the row whether that cell's
> > column has been hidden or not.
> >
> > Is there any way to do what I am trying to do? I appreciate any help.
> >
> > Thanks!
> > Sisilla

>
> --
>
> Dave Peterson


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rows().AutoFit starts a calculation, but Columns().AutoFit doesn't Stefano Microsoft Excel Programming 1 30th Nov 2009 05:01 PM
RE: Rows().AutoFit starts a calculation, but Columns().AutoFit doesn't Mike H Microsoft Excel Programming 0 25th Nov 2009 04:31 PM
Rows Autofit crapit Microsoft Excel Discussion 1 28th Dec 2004 06:43 PM
Autofit rows - excess space above text in rows =?Utf-8?B?QnJpYW4=?= Microsoft Excel Misc 1 8th Apr 2004 12:42 AM
AutoFit rows - excess space in rows Michael J. Malinsky Microsoft Excel Misc 2 29th Jan 2004 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:49 AM.