Auto Expansion of Row Height Using Text Wrap

  • Thread starter Thread starter George Cabrera
  • Start date Start date
G

George Cabrera

I have created a worksheet with 6 columns for data imput on budge
variances. On the last column, the width is set for 32 charactors fo
user to explain budget variances. However, if user's explanation i
more than 32 charactors, the column has been formated for text wrapl.
Is their a feature to auto expand the row for all data to be viewe
rather than manually expanded the row
 
George,

You can use the worksheet's change event. Copy the code below, right-click
on the sheet tab, select "view code", then paste the code in the window that
appears. Change the column letters to match your sheet's layout.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F:F")) Is Nothing Then
Target.EntireRow.AutoFit
End If
End Sub
 
Thanks Bernie .... your tip worked and sincerely appreciate taking time
the time in providing me with a solution.
George
 
Any way to then have Excel automatically readjust the row heights without having to hit enter on each cell that is partially covered up?
 
Eep²,

Generally, I find that if I select all cells, then move my cursor onto the
row button, wait till the arrow changes to the row height change icon, then
double-click, all rows are auto-height adjusted.

HTH,
Bernie
MS Excel MVP

Eep² said:
Any way to then have Excel automatically readjust the row heights without
having to hit enter on each cell that is partially covered up?
 
Some error about the apostrophe being an illegal character or something. I can't seem to duplicate it now. :/
 
Cool! Thanks. :)

Still, you'd think automatic column width/row height would be an intuitive integrated feature by default...
 
Back
Top