ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Word wrap and cell size (https://www.excelbanter.com/excel-programming/425068-word-wrap-cell-size.html)

Stanley Braverman

Word wrap and cell size
 
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



Nigel[_2_]

Word wrap and cell size
 
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



Stanley Braverman

Word wrap and cell size
 
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





Gord Dibben

Word wrap and cell size
 
Stanley

How would you designate which rows would need word wrap?

BTW..........you cannot increae row size in just two columns.

Row size is a property of the entire row.


Gord Dibben MS Excel MVP

On Wed, 4 Mar 2009 20:04:06 -0700, "Stanley Braverman"
wrote:

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



Nigel[_2_]

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







All times are GMT +1. The time now is 07:25 PM.

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