AUTOMATICALLY ADJUST COLUMN WIDTHS TO CONTENT

D

DebC

I use Microsoft Office 2003. Is there a way to get columns to automatically
adjust to fit the content of the cell?
 
B

Bernard Liengme

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
 
D

DebC

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

Rich/rerat

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top