Adjust the size of cells automatically

D

Dajana

I need to adjust the size of cells automatically. I am copying information
from one sheet to another automatically and depending on what amount of
information is copied the size of these cells has to adjust automatically or
at least increase to accomodate all text. Is there any way to do this?

Thanks
 
K

Ken Johnson

Dajana,
This worked for me:
Paste this code into ThisWorkbook code module in the VBA Editor

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Target.Columns.AutoFit
End Sub

Ken Johnson
 
Top