Auto Fit Columns Automatically???

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!
 
P

Paul B

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 **
 
S

Steve LaFever

-----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.
 
F

Fred

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
 
S

Stuart Farr

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