Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default Settign a Maximum and Minimum Row Height

I'm trying to format my spreadsheet to accomadate a minimum row height, but
be able to expand to my largest section.

Eg. I want to have my minimum row height as 51, but if the text requires
more space then that, it will allow the cell to expand to that height.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Settign a Maximum and Minimum Row Height

You will need VBA code to do that; something like this maybe...

Sub AutoFitRowHeightWhenNecessary()
Dim R As Range
Dim CurrentHeight As Double
Const MinRowHeight As Double = 51
On Error GoTo Whoops
Application.ScreenUpdating = False
For Each R In Worksheets("Sheet1").UsedRange.Rows
R.AutoFit
If R.RowHeight < MinRowHeight Then
R.RowHeight = MinRowHeight
End If
Next
Whoops:
Application.ScreenUpdating = True
End Sub

--
Rick (MVP - Excel)


"Stephen" wrote in message
...
I'm trying to format my spreadsheet to accomadate a minimum row height,
but
be able to expand to my largest section.

Eg. I want to have my minimum row height as 51, but if the text requires
more space then that, it will allow the cell to expand to that height.


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
Row Height - Forcing a Minimum ('03 & '07) Raymond W.[_2_] Excel Discussion (Misc queries) 3 September 27th 09 12:59 PM
Formula for Minimum/Maximum LaDonna Brooks Excel Worksheet Functions 2 June 24th 09 05:57 AM
Maximum and Minimum of a cell that changes dan Excel Discussion (Misc queries) 3 June 17th 09 07:15 PM
maximum/minimum value in formula Tim G. Excel Discussion (Misc queries) 2 January 10th 07 10:38 AM
Spinners - minimum and maximum Brad Excel Discussion (Misc queries) 2 September 11th 06 03:33 PM


All times are GMT +1. The time now is 02:54 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"