Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default AutoFit Visible Rows

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default AutoFit Visible Rows

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default AutoFit Visible Rows

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default AutoFit Visible Rows

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 autofit ignored by some rows Paul Excel Discussion (Misc queries) 3 September 10th 08 01:24 PM
AutoFit rows issue stego Excel Discussion (Misc queries) 0 February 28th 06 09:39 PM
can't format rows to autofit jbf Excel Discussion (Misc queries) 2 January 21st 06 11:54 PM
Autofit rows - white space. bookmike Excel Discussion (Misc queries) 2 July 8th 05 05:51 PM
Autofit on rows within a specifed range roy Excel Programming 5 October 22nd 03 04:52 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"