Text Wrap Errors

  • Thread starter Thread starter AnnieB
  • Start date Start date
A

AnnieB

I have read through many threads on the Text Wrap issue and the threads end
without any solution from MS experts.

Issue: text wrap is inconsistent in worksheet. If I take the text out of
the cell that is not expanding to fit the text and put it into a different
cell in the same row, the new cell expands correctly.

What is the solution for fixing the original cell. All formats are equal to
other cells that expand correctly.

Please help
 
Once text editting is complete, try running this small macro:

Sub wrapfixer()
'
' gsnuxx 13 September 2008
'
Dim r As Range, rWrap As Range
Dim rr As Range
Set r = ActiveSheet.UsedRange
Set rWrap = Nothing
For Each rr In r
If rr.WrapText Then
If rWrap Is Nothing Then
Set rWrap = rr
Else
Set rWrap = Union(rWrap, rr)
End If
End If
Next
If rWrap Is Nothing Then Exit Sub
For Each rr In rWrap
rr.Rows.AutoFit
Next
End Sub

It should re-AutoFit all rows containing cells with WrapText.
 
Thanks for providing this solution suggestion. Because I am not a "coder" I
would like to hear from the Excel resource team to see if they believe your
solution is viable. Thanks again for the response.
 
Back
Top