Thread
:
Word wrap and cell size
View Single Post
#
5
Posted to microsoft.public.excel.programming
Nigel[_2_]
external usenet poster
Posts: 735
Word wrap and cell size
Apologies I change the construct after copying the code, correction here
Sub wordwrap()
With Sheets("Sheet1")
.Rows("1:" & .Cells(.Rows.Count, "A").End(xlUp).Row).AutoFit
End With
End Sub
Note: The 1 at the left indicates the start row, the "A" indicates the
column letter used determine the depth of rows used. Change as required.
--
Regards,
Nigel
"Stanley Braverman" wrote in message
...
Getting Invalid or unqualified reference error
Sub wordwrap()
Sheets("Sheet1").rows("1:" & .Cells(.rows.Count,
"A").End(xlUp).Row).AutoFit
End Sub
"Nigel" wrote in message
...
Simple option you could adapt....
Sheets("Sheet1").Rows("1:" & .Cells(.Rows.Count,
"A").End(xlUp).Row).AutoFit
--
Regards,
Nigel
"Stanley Braverman" wrote in message
...
I have 2 columns that I need to automatically increase the size of the
row that would be using a word wrap. I might have several hundred rows
that does not need to be increased in size but several rows would need it
because of word wrap. Can anyone suggest a macro for this.
Thanks
Reply With Quote
Nigel[_2_]
View Public Profile
Find all posts by Nigel[_2_]