Link to home
Start Free TrialLog in
Avatar of benomoro
benomoro

asked on

Excel: Dynamically resizing row heights as text grows or shrinks

I want rows to dynamically resize depending on how much text is entered into the cells.

I have tried selecting all the cells and changing the row formatting to autofit, however this only seems to work once. The cells are set to "wrap text".
Crew,

*********EXTRA******
I am sorry I have missed an important part to my question.
One of the cells contains a an 'IF' formula.
For example at A1, the formula =IF(b1="Yes","Add really long comment here","Standard")

After experimenting with normal text, the cell will dynamically change with , 'Wrap text", 'Row autofit'. However with a conditional formula it doesn't seem to work.

Perhaps Zmey2 your solution could be expanded.


Thanks in advance.

Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

If you have wrap text turned on it should work - at least it does for me.

e.g. Format A1 and B1 as "Wrap Text" and keep typing "a" and it will spill over into extra rows.  Now add more rows of "b"'s to B1 and it will grow more.  Delete B1 and it will go back to A1's size.  Delete A1 and it will go back to the default.

Have you set a height for the row manually?  If so set it using autoFit (or double click between two rows in the margin) and try again.

The row autofit thing does only work at the moment you select it though.

Steve
Avatar of Zmey2
Zmey2

I don't know if it helps, but i've come to following solution in autofit:
1) i made a function to determine the longest word in string
2) i put this longest word into cell and autofit width
3) i put all the string and autofit row

Good luck,
Zmey2.
I agree with Steve,

select the cells

right-click then 'Format Cells'
Then select the 'Alignment' tab
Then selec 'wrap text'

Then from the Format menu select Rows, then Autofit.

that should do it.

If it doesn't I'll take a wild stab in the dark and say you've got merged cells. If you have then good luck to you because i've been trying to figure that one for agaes, autofit & wordwrap doesn't seem to like  merged cells.
Avatar of benomoro

ASKER

I am sorry I have missed an important part to my question.
One of the cells contains a an 'IF' formula.
For example at A1, the formula =IF(b1="Yes","Add really long comment here","Standard")

After experimenting with normal text, the cell will dynamically change with , 'Wrap text", 'Row autofit'. However with a conditional formula it doesn't seem to work.

Perhaps Zmey2 your solution could be expanded.


Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.

Although it looks simple, it works well.
I guess you just have to ask the right question.

Many thanks