Adjust the size of cells automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

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

Back
Top