Auto Fit Columns Automatically???

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I constantly use the functions/commands:
Format/Column/AutoFit Selection. Is there any way to make
a column automatically widen to fit contents as the
contents are entered? Thanks!
 
Fred, you could use a Worksheet Selection Change event, like this

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Columns("A:B").EntireColumn.AutoFit
End Sub

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
-----Original Message-----
I constantly use the functions/commands:
Format/Column/AutoFit Selection. Is there any way to make
a column automatically widen to fit contents as the
contents are entered? Thanks!
.
One suggestion may be to establish a macro to speed up
the process. Or, make it wider to begin and then auto fit
before printing.
 
Paul B.
That worked perfectly! I know absolutely nothing about
Visual Basic, but I'm not afraid to play around with
things. I just changed the Columns to "A:IV" so I'd cover
every last column, just in case. I noticed that the
columns automatically narrow if the contents become
narrower as well. Thank you, thank you, thank you!
Fred
 
Yes, just double click on the border between to two columns e.g. if you
want column A to adjust to the contents of that column, then double
click on the vertical line between A and B and hey presto, it's done.
 
Back
Top