Setting  The Width Of Columns According To The Cell Content


          The Life-Saving Excel Feature You Probably Didn’t Notice.

By this code, Excel automatically adjusts the width of a column to accommodate the width of the text that takes up the most horizantal space in each row :
For this , we added that VBA codes to Data sheet Worksheet_Change procedure:
Private Sub Worksheet_Change(ByVal Target As Range)
Columns(Target.Column).AutoFit
End Sub



Post a Comment

Previous Post Next Post