Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 autofit ignored by some rows | Excel Discussion (Misc queries) | |||
AutoFit rows issue | Excel Discussion (Misc queries) | |||
can't format rows to autofit | Excel Discussion (Misc queries) | |||
Autofit rows - white space. | Excel Discussion (Misc queries) | |||
Autofit on rows within a specifed range | Excel Programming |