Rows Autofit

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

I try to set autofit for rows but got error
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).row
rows("2:lastrow").autofit
 
Try:

rows("2:" & lastrow).autofit


I try to set autofit for rows but got error
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).row
rows("2:lastrow").autofit
 

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