Forum Discussion

nurul4amin's avatar
nurul4amin
Copper Contributor
Jun 17, 2022

Adjust the text size automatically

I need the box to adjust (width and height) the text size. If I change the width, the height will adjust automatically. No manual work needs to do.

 

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    nurul4amin 

    Change the column width and row height

    Open Excel and select the cell whose height is to be adjusted.

    You can also select the entire line or the entire content of the document using (Ctrl) + (A).

    Then click Home > Format > AutoFit Row Height.

     

    ...or with VBA Code

     

    Sub TextinCell()
    
    Columns("A:Z").EntireColumn.AutoFit
    ActiveSheet.Rows.AutoFit
    
    End Sub

     

     

     

Resources