Auto fit Method

     

  • If data\content of the cell is more than its width, we can adjust the data in a cell by increasing the column width
  •  

  • Autofit method enables the user to fit the data in a particular cell by increasing column width
  •  

  • Syntax:

    Range.Columns.autofit

  • Syntax:

    Range.Rows.autofit

  •  

    Range represents to entire row or entire columns., it doesn't allow the user to fit individual cell range like range('A1"),range("B1")..., it shows error message