Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Set row heights to values in cells

Can anyone provide VBA code to set row heights for a range of rows (say, rows
20-100) to the values in a particular column (say column A)? In other words,
row height for row 1 equals value in cell A1; row height for row 2 equals
value in cell A2, etc. Also, what limit does Excel impose on maximum row
height? Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Set row heights to values in cells

Sub SetHeights()
Dim cell As Range
For Each cell In Range("A1:A20")
cell.EntireRow.RowHeight = cell.Value
Next
End Sub


--
Regards,
Tom Ogilvy


"John" wrote in message
...
Can anyone provide VBA code to set row heights for a range of rows (say,

rows
20-100) to the values in a particular column (say column A)? In other

words,
row height for row 1 equals value in cell A1; row height for row 2 equals
value in cell A2, etc. Also, what limit does Excel impose on maximum row
height? Any help would be appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Set row heights to values in cells

Thanks Tom.

"Tom Ogilvy" wrote:

Sub SetHeights()
Dim cell As Range
For Each cell In Range("A1:A20")
cell.EntireRow.RowHeight = cell.Value
Next
End Sub


--
Regards,
Tom Ogilvy


"John" wrote in message
...
Can anyone provide VBA code to set row heights for a range of rows (say,

rows
20-100) to the values in a particular column (say column A)? In other

words,
row height for row 1 equals value in cell A1; row height for row 2 equals
value in cell A2, etc. Also, what limit does Excel impose on maximum row
height? Any help would be appreciated.




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 heights Pyrite Excel Discussion (Misc queries) 4 September 27th 08 01:08 AM
How can cells with differing heights exist in the same row? Hugnuffer Excel Discussion (Misc queries) 2 May 23rd 07 06:14 PM
row heights A Excel Discussion (Misc queries) 1 February 28th 07 05:12 PM
Excel: copy grid, widths & heights down page: heights wrong! why? K Excel Discussion (Misc queries) 1 June 24th 06 03:06 AM
Row Heights trickdos[_12_] Excel Programming 1 September 14th 04 09:12 PM


All times are GMT +1. The time now is 06:48 PM.

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"