AUTOMATICALLY ADJUST COLUMN WIDTHS TO CONTENT

  • Thread starter Thread starter DebC
  • Start date Start date
D

DebC

I use Microsoft Office 2003. Is there a way to get columns to automatically
adjust to fit the content of the cell?
 
Double click the separator between the column and the one to the right
or
Select all the columns and use Format | Columns | AutoAdjust

I know of no way to make Excel automatically widen a column to hold any
amount of test entered into it.
best wishes
 
Thank you; that is sort of what I thought, but hoped someone would be able to
tell me differently! hehe Thank you so much.
 
DebC,

Right click the Sheet tab> Select View Code> Copy and paste the following:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim myRange As Range
Set myRange = Range("a1:m100")

' Adjust Range to Suit your needs.

If Union(Target, myRange).Address = myRange.Address Then
' ColumnReset Macro
' Reset Column WIdths
'

'
Cells.Select
Selection.Columns.AutoFit

End If

End Sub

This will the column's width in the range selected, after entering data and
moving to the next cell using TAB or ENTER. You will need to alter the range
to suit your needs.

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>


Thank you; that is sort of what I thought, but hoped someone would be able
to
tell me differently! hehe Thank you so much.
 
Back
Top