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