ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need code to Autofit Row Height on recalculation (https://www.excelbanter.com/excel-discussion-misc-queries/16157-need-code-autofit-row-height-recalculation.html)

Bob Tarburton

Need code to Autofit Row Height on recalculation
 
Among others, I'm having some trouble getting Jim Rech's code to
Autofit Row height in merged cells to work the way I want it to.

Is there a simple worksheet event code I could use to Autofit Row in
four cells, preferably upon recalculation?

Specifically, A:N are merges in four different rows, 23, 47, 68, and
70

The width of column Column Z is is the same as A:N combined
Z23 is =A23
Z47 is =A27
etc.
Autofit doesn't automatically work in Z23 because of the formula, in
fact, F2 Enter doesn't even work. I have to paste values or select the
cells and Alt O R A.

I should figure this out myself, getting VBA for morons this weekend,
but if someone would help with this one I'd appreciate it.

Application.Goto Reference:="Z23,Z47,Z68,Z70"
Selection.Rows.AutoFit


All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com