Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I've a worksheet with cells that are filled with a Hlookup function. The problem is that sometimes the data in one cell is just one word but other times 1000 words. Is it possible to add a propery to the cell so that they are adjusted to fit the content best? (I wan't them to be adjusted vertically) Thanks, Bernd |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you can tie into that worksheet's calculation event to resize the rows.
If you want to try, right click on the worksheet that should have this behavior. Select View code. Paste this into the code window: Option Explicit Private Sub Worksheet_Calculate() application.enableevents = false Me.Rows.AutoFit 'or be specific Me.Rows("1:33").AutoFit application.enableevents = true End Sub Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the excel to want to recalc again. The .enableevents stuff stops excel from going into a loop--recalc, loop, recalc, loop, .... bernd wrote: Hello, I've a worksheet with cells that are filled with a Hlookup function. The problem is that sometimes the data in one cell is just one word but other times 1000 words. Is it possible to add a propery to the cell so that they are adjusted to fit the content best? (I wan't them to be adjusted vertically) Thanks, Bernd -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks, works perfect!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ComboBox autosize | Excel Worksheet Functions | |||
Autosize cells as data is entered | Excel Discussion (Misc queries) | |||
Autosize Error | Excel Discussion (Misc queries) | |||
Autosize merged cells | Excel Discussion (Misc queries) | |||
autosize | Excel Programming |