Column Autofit

M

mcolson

Is it possible to change the setting for column autofit, so that it
fits the column to the cell with the greatest amount of text, plus 1
or 2 spaces. I could use the indent to add a space, but I would
prefer that my info is centered. If the autofit were to fit the
column based on a cell with 10 characters. I would rather have it
adjust the column for 12 characters, in order to make things easier to
read. Is there a setting I can change somewhere in the options?
 
B

Bill Ridgeway

mcolson said:
Is it possible to change the setting for column autofit, so that it
fits the column to the cell with the greatest amount of text, plus 1
or 2 spaces. I could use the indent to add a space, but I would
prefer that my info is centered. If the autofit were to fit the
column based on a cell with 10 characters. I would rather have it
adjust the column for 12 characters, in order to make things easier to
read. Is there a setting I can change somewhere in the options?

'Best fit' is affected by a number of things. The width of a column (even
containing the same sequence of characters) will be affected the characters
("w takes more space than a "i"), capitalisation, font and bold. It is not
good practice to pad out a cell with cells. It creates all sorts of
problems. You say you prefer info to be cantered so why not format the
column to cantered text and then just autofit it?

Bill Ridgeway
Computer Solutions
 
M

mcolson

'Best fit' is affected by a number of things. The width of a column (even
containing the same sequence of characters) will be affected the characters
("w takes more space than a "i"), capitalisation, font and bold. It is not
good practice to pad out a cell with cells. It creates all sorts of
problems. You say you prefer info to be cantered so why not format the
column to cantered text and then just autofit it?

Bill Ridgeway
Computer Solutions

Centering it and then just using auto fit, just seems to crunched at
times. I was able to use the following macro.
Dim i As Integer
Dim test
i = 1
Columns("A:z").Select
Selection.Columns.AutoFit
While i < 10
If (Cells(1, i)) <> "" Then
Cells(1, i).Select
Selection.ColumnWidth = Selection.ColumnWidth + 2
End If
i = i + 1
Wend
 

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