Text Wrap Errors

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
 
G

Gary''s Student

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.
 
A

AnnieB

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top