LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default AutoFitMergedCellRowHeight

Pass two arguments in your call to the macro:
AutoFitMergedCellRowHeight ActiveCell, 12.75

Add an extra argument to the main macro:
Sub AutoFitMergedCellRowHeight(Rng As Range, Limit As Single)

Substitute this line:
..RowHeight = Application.Max(PossNewRowHeight / .Rows.Count, Limit)
For this line:
..RowHeight = PossNewRowHeight / .Rows.Count

Greg

"Martin" wrote:

Thanks a lot Greg,

As you have mentioned the rows resize evenly. Is there a way to specify a
minimum row height within the macro you provided. Or is it easier for me to
run another macro resizing to the minimum row height?

What do you think?
--
Many thanks for your help and kind regards,

Martin


"Greg Wilson" wrote:

I should also advise you that the macro will expand / contract the merged
rows evenly. I presume you also have nonmerged cells sharing the same rows.
Else, you wouldn't need to merge the range across rows but rather just
increase the row height. This being the case, you need to specify how you
want the rows to resize so they don't conflict with the nonmerged cells.

Greg



"Martin" wrote:

Hello there,

I am using the "AutoFitMergedCellRowHeight" macro which is working fine for
merged cells across several columns on one row such as range(A1:C1). But is
does not seem to work when the merged cell is across several columns and also
across several rows such as range(A1:C4). Does anyone have any idea of how to
solve this problem.

Any help much appreciated.

--
Regards,

Martin

 
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
AutoFitMergedCellRowHeight - Jim Rech David Excel Worksheet Functions 1 May 20th 06 05:57 AM


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

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

About Us

"It's about Microsoft Excel"