Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dcl dcl is offline
external usenet poster
 
Posts: 1
Default Setting the row height based on a cell value

I want to set the row height of all rows after after a certain row based on
the value of a cell within each row.

Can anyone give me the VB to do this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Setting the row height based on a cell value

If you want to set row height based on the values in Column B,you can
use the below code to do the same.

Sub Macro1()
For i = 1 To 20
If Range("B" & i).Value < "" Then
ActiveSheet.Rows(i & ":" & i).RowHeight = Range("B" & i).Value
End If
Next
End Sub

Cheers :)

-Ayush Jain


On May 13, 9:19 am, dcl wrote:
I want to set the row height of all rows after after a certain row based on
the value of a cell within each row.

Can anyone give me the VB to do this?

Thanks


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
Automatically Change Row Height Based on Cell Contents? samcham Excel Programming 6 May 7th 08 11:05 PM
Change row height based on content of merged cell Steve[_89_] Excel Programming 2 May 1st 07 02:32 PM
Need help setting the worksheet header/Footer margins based on string height? Doug Excel Programming 3 August 21st 06 05:08 PM
Need help setting the worksheet header/Footer margins based on string height? Doug Excel Discussion (Misc queries) 0 August 20th 06 02:05 AM
Set new row height based on current height puffy Excel Programming 2 January 14th 04 12:44 AM


All times are GMT +1. The time now is 10:26 PM.

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"