Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like columns and rows to adjust according to the values I
enter cells. For example, if A1=12, then I want column C to be widened to a width of 12. If A2=15, then row 3 should heighten to a height of 15. Is this possible? Thanks for your help. Michael |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Put your two values in A1 and A2 then run this macro:Sub Blah() Columns("C:C").ColumnWidth = Range("A1").Value Rows("3:3").RowHeight = Range("A2").Value End Sub or put the following in the sheet's code module:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("A1").Address Then Columns("C:C").ColumnWidth = Range("A1").Value End If If Target.Address = Range("A2").Address Then Rows("3:3").RowHeight = Range("A2").Value End If End Sub and watch the column width and row height change as you enter different values in the two cells. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=135028 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. I'll be giving it a try shortly.
Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you protect a worksheet from having the columns resized,not ro | Excel Worksheet Functions | |||
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? | New Users to Excel | |||
rows and columns won't stay resized | Excel Worksheet Functions | |||
columns and rows on my worksheet will not stay resized | Excel Worksheet Functions | |||
Charts should not be resized when deleting rows/columns. | Charts and Charting in Excel |