Column width in Excel 2003

My Bureau Chief has an Excel 2003 document that he receives from our 
finacial unit.  When he tries to print the document out it shows ###### in 
different cells throughout the entire document.  In the past when he used 
Excel 2000 he would just double click on the right hand side of the top of 
the column and it would expand the column one character larger and would 
print the whole number in each of those cells.  In Excel 2003 when he does 
this, it still shows the #####'s and he has to physically go in and move the 
column over ever so slightly to get it to print out correctly.  When there 
are numerous columns that have this issue, it is very time consuming.  Is 
there another way to correct this that is fast and easy rather than manually 
having to expand the column?  He also does not want to make all of the 
columns the same width as this would take up quite a bit more paper when 
printing out.

PS  Throughout each column there are different font sizes. 


0
12/28/2007 11:50:52 PM
excel 39879 articles. 2 followers. Follow

11 Replies
657 Views

Similar Articles

[PageSpeed] 1

Select all the columns, then, from the Menu Bar:

<Format> <Columns> <AutoFit>

Each column will be *individually* sized to display the widest entry in that 
column.
-- 
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"AnneK" <NoReturnemails@usa.net> wrote in message 
news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
> My Bureau Chief has an Excel 2003 document that he receives from our 
> finacial unit.  When he tries to print the document out it shows ###### in 
> different cells throughout the entire document.  In the past when he used 
> Excel 2000 he would just double click on the right hand side of the top of 
> the column and it would expand the column one character larger and would 
> print the whole number in each of those cells.  In Excel 2003 when he does 
> this, it still shows the #####'s and he has to physically go in and move 
> the column over ever so slightly to get it to print out correctly.  When 
> there are numerous columns that have this issue, it is very time 
> consuming.  Is there another way to correct this that is fast and easy 
> rather than manually having to expand the column?  He also does not want 
> to make all of the columns the same width as this would take up quite a 
> bit more paper when printing out.
>
> PS  Throughout each column there are different font sizes.
> 


0
ragdyer1 (4060)
12/29/2007 12:46:40 AM
Try selecting all the columns in the range and Format>Column>Autofit Selection.

Which is what the double-click should be doing...........fitting to selection,
not expanding one character larger as you state.


Gord Dibben  MS Excel MVP

On Fri, 28 Dec 2007 16:50:52 -0700, "AnneK" <NoReturnemails@usa.net> wrote:

>My Bureau Chief has an Excel 2003 document that he receives from our 
>finacial unit.  When he tries to print the document out it shows ###### in 
>different cells throughout the entire document.  In the past when he used 
>Excel 2000 he would just double click on the right hand side of the top of 
>the column and it would expand the column one character larger and would 
>print the whole number in each of those cells.  In Excel 2003 when he does 
>this, it still shows the #####'s and he has to physically go in and move the 
>column over ever so slightly to get it to print out correctly.  When there 
>are numerous columns that have this issue, it is very time consuming.  Is 
>there another way to correct this that is fast and easy rather than manually 
>having to expand the column?  He also does not want to make all of the 
>columns the same width as this would take up quite a bit more paper when 
>printing out.
>
>PS  Throughout each column there are different font sizes. 
>

0
Gord
12/29/2007 12:51:59 AM
I think that what she meant by "one character larger" is that 
double-clicking the column border will expand the column so that it is one 
character larger than the longest value in the column.

I work for the same organization as Anne, and while I'm not working this 
particular issue I have seen the spreadsheet in question.  RagDyer's 
recommendation of selecting multiple columns--and maybe even all columns, 
depending on how you want things to look--and then going to Format > Column 
 > AutoFit Selection may be a viable work-around, but I'd be interested in 
knowing the root cause of the behavior.

Double-clicking the column border does indeed auto size the column so that 
all the values can be seen.  However, even after double-clicking the column 
borders the ####### mask can still be seen in Print Preview for certain 
values, and the spreadsheet will print out that way as well.  I think the 
deeper question is, "If double-clicking works to expand the columns and make 
all the values visible in Normal view, then why aren't those values 
displayed properly in Print Preview or on the actual print out?"

--Tom

"Gord Dibben" <gorddibbATshawDOTca> wrote in message 
news:ia6bn3pq4ebd3j5i52ouq8g8u2uv0vjsj2@4ax.com...
> Try selecting all the columns in the range and Format>Column>Autofit 
> Selection.
>
> Which is what the double-click should be doing...........fitting to 
> selection,
> not expanding one character larger as you state.
>
>
> Gord Dibben  MS Excel MVP
>
> On Fri, 28 Dec 2007 16:50:52 -0700, "AnneK" <NoReturnemails@usa.net> 
> wrote:
>
>>My Bureau Chief has an Excel 2003 document that he receives from our
>>finacial unit.  When he tries to print the document out it shows ###### in
>>different cells throughout the entire document.  In the past when he used
>>Excel 2000 he would just double click on the right hand side of the top of
>>the column and it would expand the column one character larger and would
>>print the whole number in each of those cells.  In Excel 2003 when he does
>>this, it still shows the #####'s and he has to physically go in and move 
>>the
>>column over ever so slightly to get it to print out correctly.  When there
>>are numerous columns that have this issue, it is very time consuming.  Is
>>there another way to correct this that is fast and easy rather than 
>>manually
>>having to expand the column?  He also does not want to make all of the
>>columns the same width as this would take up quite a bit more paper when
>>printing out.
>>
>>PS  Throughout each column there are different font sizes.
>>
> 


0
12/31/2007 5:23:16 PM
I think that would be a function of your printer driver and the way it
interfaces with Excel.

That's why Print Preview is such a handy feature.


Gord

On Mon, 31 Dec 2007 10:23:16 -0700, "Thomas M." <NoEmailReplies@Please.com>
wrote:

> "If double-clicking works to expand the columns and make 
>all the values visible in Normal view, then why aren't those values 
>displayed properly in Print Preview or on the actual print out?"

0
Gord
12/31/2007 10:39:01 PM
I've read through this thread and I think you may be able to use this macro. 
It lets you specify a "buffer factor" value (a number greater than 1) to 
increase a column width by (for example, 1.1 will make a column 10% wider 
than the AutoFit width) to create "extra" white space for the text UNLESS 
the column width is already the buffer factor or more larger, in which case 
that width is preserved. The buffer factor is specified in the Const 
statement... I used 10% for my tests; but, perhaps, you can use 1.05 (5% 
extra white space)... you will have to test to see what minimum buffer 
factor you can get away with.

Sub SizeToFit()
  Dim R As Range
  Dim X As Long, z
  Dim ColWidth As Double
  Const Tolerance As Double = 1.1  '10% extra room
  Set R = Worksheets("Sheet1").UsedRange
  For X = R.Column To R.Columns.Count
    ColWidth = Columns(X).ColumnWidth
    If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row = 1 Then
      If Worksheets("Sheet1").Cells(Rows.Count, X).Value = "" Then
        GoTo Continue
      End If
    End If
    Columns(X).AutoFit
    If Tolerance * Columns(X).ColumnWidth < ColWidth Then
      Columns(X).ColumnWidth = ColWidth
    Else
      Columns(X).ColumnWidth = Tolerance * Columns(X).ColumnWidth
    End If
Continue:
  Next
End Sub

Rick




"AnneK" <NoReturnemails@usa.net> wrote in message 
news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
> My Bureau Chief has an Excel 2003 document that he receives from our 
> finacial unit.  When he tries to print the document out it shows ###### in 
> different cells throughout the entire document.  In the past when he used 
> Excel 2000 he would just double click on the right hand side of the top of 
> the column and it would expand the column one character larger and would 
> print the whole number in each of those cells.  In Excel 2003 when he does 
> this, it still shows the #####'s and he has to physically go in and move 
> the column over ever so slightly to get it to print out correctly.  When 
> there are numerous columns that have this issue, it is very time 
> consuming.  Is there another way to correct this that is fast and easy 
> rather than manually having to expand the column?  He also does not want 
> to make all of the columns the same width as this would take up quite a 
> bit more paper when printing out.
>
> PS  Throughout each column there are different font sizes.
> 

0
1/1/2008 3:41:42 AM
Rick,

Thanks for the code!  The first two columns of the spreadsheet are labels 
for the rows and we don't want to change the widths of those columns, so I 
added an IF statement at the top of the FOR loop as follows:

  For X = R.Column To R.Columns.Count
    If X < 3 Then
        GoTo Continue
    End If

Otherwise, I did not need to change anything.

--Tom

"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in 
message news:uQ5r6gCTIHA.3940@TK2MSFTNGP05.phx.gbl...
> I've read through this thread and I think you may be able to use this 
> macro. It lets you specify a "buffer factor" value (a number greater than 
> 1) to increase a column width by (for example, 1.1 will make a column 10% 
> wider than the AutoFit width) to create "extra" white space for the text 
> UNLESS the column width is already the buffer factor or more larger, in 
> which case that width is preserved. The buffer factor is specified in the 
> Const statement... I used 10% for my tests; but, perhaps, you can use 1.05 
> (5% extra white space)... you will have to test to see what minimum buffer 
> factor you can get away with.
>
> Sub SizeToFit()
>  Dim R As Range
>  Dim X As Long, z
>  Dim ColWidth As Double
>  Const Tolerance As Double = 1.1  '10% extra room
>  Set R = Worksheets("Sheet1").UsedRange
>  For X = R.Column To R.Columns.Count
>    ColWidth = Columns(X).ColumnWidth
>    If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row = 1 Then
>      If Worksheets("Sheet1").Cells(Rows.Count, X).Value = "" Then
>        GoTo Continue
>      End If
>    End If
>    Columns(X).AutoFit
>    If Tolerance * Columns(X).ColumnWidth < ColWidth Then
>      Columns(X).ColumnWidth = ColWidth
>    Else
>      Columns(X).ColumnWidth = Tolerance * Columns(X).ColumnWidth
>    End If
> Continue:
>  Next
> End Sub
>
> Rick
>
>
>
>
> "AnneK" <NoReturnemails@usa.net> wrote in message 
> news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
>> My Bureau Chief has an Excel 2003 document that he receives from our 
>> finacial unit.  When he tries to print the document out it shows ###### 
>> in different cells throughout the entire document.  In the past when he 
>> used Excel 2000 he would just double click on the right hand side of the 
>> top of the column and it would expand the column one character larger and 
>> would print the whole number in each of those cells.  In Excel 2003 when 
>> he does this, it still shows the #####'s and he has to physically go in 
>> and move the column over ever so slightly to get it to print out 
>> correctly.  When there are numerous columns that have this issue, it is 
>> very time consuming.  Is there another way to correct this that is fast 
>> and easy rather than manually having to expand the column?  He also does 
>> not want to make all of the columns the same width as this would take up 
>> quite a bit more paper when printing out.
>>
>> PS  Throughout each column there are different font sizes.
>>
> 


0
1/7/2008 8:16:18 PM
You are quite welcome... I'm glad you could make use of the code. By the 
way, instead of adding your 3-line If-Then code block, you could have just 
changed the For-Next statement to this...

For X = 3 To R.Columns.Count

I wasn't sure where your data was, so I just used the UsedRange as my 
limits; but since you know the beginning column is 1, you can simply adjust 
the For-Next lower limit to avoid the first 2 columns.

Rick


"Thomas M." <NoEmailReplies@Please.com> wrote in message 
news:%23jrqwoWUIHA.5288@TK2MSFTNGP04.phx.gbl...
> Rick,
>
> Thanks for the code!  The first two columns of the spreadsheet are labels 
> for the rows and we don't want to change the widths of those columns, so I 
> added an IF statement at the top of the FOR loop as follows:
>
>  For X = R.Column To R.Columns.Count
>    If X < 3 Then
>        GoTo Continue
>    End If
>
> Otherwise, I did not need to change anything.
>
> --Tom
>
> "Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in 
> message news:uQ5r6gCTIHA.3940@TK2MSFTNGP05.phx.gbl...
>> I've read through this thread and I think you may be able to use this 
>> macro. It lets you specify a "buffer factor" value (a number greater than 
>> 1) to increase a column width by (for example, 1.1 will make a column 10% 
>> wider than the AutoFit width) to create "extra" white space for the text 
>> UNLESS the column width is already the buffer factor or more larger, in 
>> which case that width is preserved. The buffer factor is specified in the 
>> Const statement... I used 10% for my tests; but, perhaps, you can use 
>> 1.05 (5% extra white space)... you will have to test to see what minimum 
>> buffer factor you can get away with.
>>
>> Sub SizeToFit()
>>  Dim R As Range
>>  Dim X As Long, z
>>  Dim ColWidth As Double
>>  Const Tolerance As Double = 1.1  '10% extra room
>>  Set R = Worksheets("Sheet1").UsedRange
>>  For X = R.Column To R.Columns.Count
>>    ColWidth = Columns(X).ColumnWidth
>>    If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row = 1 Then
>>      If Worksheets("Sheet1").Cells(Rows.Count, X).Value = "" Then
>>        GoTo Continue
>>      End If
>>    End If
>>    Columns(X).AutoFit
>>    If Tolerance * Columns(X).ColumnWidth < ColWidth Then
>>      Columns(X).ColumnWidth = ColWidth
>>    Else
>>      Columns(X).ColumnWidth = Tolerance * Columns(X).ColumnWidth
>>    End If
>> Continue:
>>  Next
>> End Sub
>>
>> Rick
>>
>>
>>
>>
>> "AnneK" <NoReturnemails@usa.net> wrote in message 
>> news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
>>> My Bureau Chief has an Excel 2003 document that he receives from our 
>>> finacial unit.  When he tries to print the document out it shows ###### 
>>> in different cells throughout the entire document.  In the past when he 
>>> used Excel 2000 he would just double click on the right hand side of the 
>>> top of the column and it would expand the column one character larger 
>>> and would print the whole number in each of those cells.  In Excel 2003 
>>> when he does this, it still shows the #####'s and he has to physically 
>>> go in and move the column over ever so slightly to get it to print out 
>>> correctly.  When there are numerous columns that have this issue, it is 
>>> very time consuming.  Is there another way to correct this that is fast 
>>> and easy rather than manually having to expand the column?  He also does 
>>> not want to make all of the columns the same width as this would take up 
>>> quite a bit more paper when printing out.
>>>
>>> PS  Throughout each column there are different font sizes.
>>>
>>
>
> 

0
1/7/2008 9:12:41 PM
I tried something like that.  Actually, what I did was to define a named 
range that started with the 3rd column and covered the entire area of data, 
and then I inserted that named range into the code.  Done right, I'm sure 
that would also fix the problem, but I'm not real familiar with Excel VBA 
these days and so I was having a problem making it loop the correct number 
of times.  Clearly, I had a bug in my code, so I finally figured that 
switching my approach and using a simple IF statement was easier than 
keeping the more complicated code and trying to find the bug.  For whatever 
reason, changing the lower limit on the FOR loop didn't occur to me, but it 
is a more efficient solution.

Thanks for the help.

"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in 
message news:esjuDIXUIHA.4684@TK2MSFTNGP06.phx.gbl...
> You are quite welcome... I'm glad you could make use of the code. By the 
> way, instead of adding your 3-line If-Then code block, you could have just 
> changed the For-Next statement to this...
>
> For X = 3 To R.Columns.Count
>
> I wasn't sure where your data was, so I just used the UsedRange as my 
> limits; but since you know the beginning column is 1, you can simply 
> adjust the For-Next lower limit to avoid the first 2 columns.
>
> Rick
>
>
> "Thomas M." <NoEmailReplies@Please.com> wrote in message 
> news:%23jrqwoWUIHA.5288@TK2MSFTNGP04.phx.gbl...
>> Rick,
>>
>> Thanks for the code!  The first two columns of the spreadsheet are labels 
>> for the rows and we don't want to change the widths of those columns, so 
>> I added an IF statement at the top of the FOR loop as follows:
>>
>>  For X = R.Column To R.Columns.Count
>>    If X < 3 Then
>>        GoTo Continue
>>    End If
>>
>> Otherwise, I did not need to change anything.
>>
>> --Tom
>>
>> "Rick Rothstein (MVP - VB)" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in 
>> message news:uQ5r6gCTIHA.3940@TK2MSFTNGP05.phx.gbl...
>>> I've read through this thread and I think you may be able to use this 
>>> macro. It lets you specify a "buffer factor" value (a number greater 
>>> than 1) to increase a column width by (for example, 1.1 will make a 
>>> column 10% wider than the AutoFit width) to create "extra" white space 
>>> for the text UNLESS the column width is already the buffer factor or 
>>> more larger, in which case that width is preserved. The buffer factor is 
>>> specified in the Const statement... I used 10% for my tests; but, 
>>> perhaps, you can use 1.05 (5% extra white space)... you will have to 
>>> test to see what minimum buffer factor you can get away with.
>>>
>>> Sub SizeToFit()
>>>  Dim R As Range
>>>  Dim X As Long, z
>>>  Dim ColWidth As Double
>>>  Const Tolerance As Double = 1.1  '10% extra room
>>>  Set R = Worksheets("Sheet1").UsedRange
>>>  For X = R.Column To R.Columns.Count
>>>    ColWidth = Columns(X).ColumnWidth
>>>    If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row = 1 Then
>>>      If Worksheets("Sheet1").Cells(Rows.Count, X).Value = "" Then
>>>        GoTo Continue
>>>      End If
>>>    End If
>>>    Columns(X).AutoFit
>>>    If Tolerance * Columns(X).ColumnWidth < ColWidth Then
>>>      Columns(X).ColumnWidth = ColWidth
>>>    Else
>>>      Columns(X).ColumnWidth = Tolerance * Columns(X).ColumnWidth
>>>    End If
>>> Continue:
>>>  Next
>>> End Sub
>>>
>>> Rick
>>>
>>>
>>>
>>>
>>> "AnneK" <NoReturnemails@usa.net> wrote in message 
>>> news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
>>>> My Bureau Chief has an Excel 2003 document that he receives from our 
>>>> finacial unit.  When he tries to print the document out it shows ###### 
>>>> in different cells throughout the entire document.  In the past when he 
>>>> used Excel 2000 he would just double click on the right hand side of 
>>>> the top of the column and it would expand the column one character 
>>>> larger and would print the whole number in each of those cells.  In 
>>>> Excel 2003 when he does this, it still shows the #####'s and he has to 
>>>> physically go in and move the column over ever so slightly to get it to 
>>>> print out correctly.  When there are numerous columns that have this 
>>>> issue, it is very time consuming.  Is there another way to correct this 
>>>> that is fast and easy rather than manually having to expand the column? 
>>>> He also does not want to make all of the columns the same width as this 
>>>> would take up quite a bit more paper when printing out.
>>>>
>>>> PS  Throughout each column there are different font sizes.
>>>>
>>>
>>
>>
> 


0
1/8/2008 1:09:49 AM
On Dec 31 2007, 9:41=A0pm, "Rick Rothstein \(MVP - VB\)"
<rickNOSPAMn...@NOSPAMcomcast.net> wrote:
> I've read through this thread and I think you may be able to use this macr=
o.
> It lets you specify a "buffer factor" value (a number greater than 1) to
> increase a column width by (for example, 1.1 will make a column 10% wider
> than the AutoFit width) to create "extra" white space for the text UNLESS
> the column width is already the buffer factor or more larger, in which cas=
e
> that width is preserved. The buffer factor is specified in the Const
> statement... I used 10% for my tests; but, perhaps, you can use 1.05 (5%
> extra white space)... you will have to test to see what minimum buffer
> factor you can get away with.
>
> Sub SizeToFit()
> =A0 Dim R As Range
> =A0 Dim X As Long, z
> =A0 Dim ColWidth As Double
> =A0 Const Tolerance As Double =3D 1.1 =A0'10% extra room
> =A0 Set R =3D Worksheets("Sheet1").UsedRange
> =A0 For X =3D R.Column To R.Columns.Count
> =A0 =A0 ColWidth =3D Columns(X).ColumnWidth
> =A0 =A0 If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row =3D 1 T=
hen
> =A0 =A0 =A0 If Worksheets("Sheet1").Cells(Rows.Count, X).Value =3D "" Then=

> =A0 =A0 =A0 =A0 GoTo Continue
> =A0 =A0 =A0 End If
> =A0 =A0 End If
> =A0 =A0 Columns(X).AutoFit
> =A0 =A0 If Tolerance * Columns(X).ColumnWidth < ColWidth Then
> =A0 =A0 =A0 Columns(X).ColumnWidth =3D ColWidth
> =A0 =A0 Else
> =A0 =A0 =A0 Columns(X).ColumnWidth =3D Tolerance * Columns(X).ColumnWidth
> =A0 =A0 End If
> Continue:
> =A0 Next
> End Sub
>
> Rick
>
> "AnneK" <NoReturnema...@usa.net> wrote in message
>
> news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
>
> > My Bureau Chief has an Excel 2003 document that he receives from our
> > finacial unit. =A0When he tries to print the document out it shows #####=
# in
> > different cells throughout the entire document. =A0In the past when he u=
sed
> > Excel 2000 he would just double click on the right hand side of the top =
of
> > the column and it would expand the column one character larger and would=

> > print the whole number in each of those cells. =A0In Excel 2003 when he =
does
> > this, it still shows the #####'s and he has to physically go in and move=

> > the column over ever so slightly to get it to print out correctly. =A0Wh=
en
> > there are numerous columns that have this issue, it is very time
> > consuming. =A0Is there another way to correct this that is fast and easy=

> > rather than manually having to expand the column? =A0He also does not wa=
nt
> > to make all of the columns the same width as this would take up quite a
> > bit more paper when printing out.
>
> > PS =A0Throughout each column there are different font sizes.

I would love to use this code as well, but i am getting an error. I am
using Excel 2004 on Mac OS X Leopard.  The error i get is on this
line...  Const Tolerance As Double =3D 1.1 =A0'10% extra room  - Syntax
error?

any ideas?

Thanks in Advance,
Aaron
0
1/18/2008 7:51:27 PM
On Jan 18, 1:51=A0pm, aaronroess...@gmail.com wrote:
> On Dec 31 2007, 9:41=A0pm, "Rick Rothstein \(MVP - VB\)"
>
>
>
> <rickNOSPAMn...@NOSPAMcomcast.net> wrote:
> > I've read through this thread and I think you may be able to use this ma=
cro.
> > It lets you specify a "buffer factor" value (a number greater than 1) to=

> > increase a column width by (for example, 1.1 will make a column 10% wide=
r
> > than the AutoFit width) to create "extra" white space for the text UNLES=
S
> > the column width is already the buffer factor or more larger, in which c=
ase
> > that width is preserved. The buffer factor is specified in the Const
> > statement... I used 10% for my tests; but, perhaps, you can use 1.05 (5%=

> > extra white space)... you will have to test to see what minimum buffer
> > factor you can get away with.
>
> > Sub SizeToFit()
> > =A0 Dim R As Range
> > =A0 Dim X As Long, z
> > =A0 Dim ColWidth As Double
> > =A0 Const Tolerance As Double =3D 1.1 =A0'10% extra room
> > =A0 Set R =3D Worksheets("Sheet1").UsedRange
> > =A0 For X =3D R.Column To R.Columns.Count
> > =A0 =A0 ColWidth =3D Columns(X).ColumnWidth
> > =A0 =A0 If Worksheets("Sheet1").Cells(Rows.Count, X).End(xlUp).Row =3D 1=
 Then
> > =A0 =A0 =A0 If Worksheets("Sheet1").Cells(Rows.Count, X).Value =3D "" Th=
en
> > =A0 =A0 =A0 =A0 GoTo Continue
> > =A0 =A0 =A0 End If
> > =A0 =A0 End If
> > =A0 =A0 Columns(X).AutoFit
> > =A0 =A0 If Tolerance * Columns(X).ColumnWidth < ColWidth Then
> > =A0 =A0 =A0 Columns(X).ColumnWidth =3D ColWidth
> > =A0 =A0 Else
> > =A0 =A0 =A0 Columns(X).ColumnWidth =3D Tolerance * Columns(X).ColumnWidt=
h
> > =A0 =A0 End If
> > Continue:
> > =A0 Next
> > End Sub
>
> > Rick
>
> > "AnneK" <NoReturnema...@usa.net> wrote in message
>
> >news:%23l2s7xaSIHA.2268@TK2MSFTNGP02.phx.gbl...
>
> > > My Bureau Chief has an Excel 2003 document that he receives from our
> > > finacial unit. =A0When he tries to print the document out it shows ###=
### in
> > > different cells throughout the entire document. =A0In the past when he=
 used
> > > Excel 2000 he would just double click on the right hand side of the to=
p of
> > > the column and it would expand the column one character larger and wou=
ld
> > > print the whole number in each of those cells. =A0In Excel 2003 when h=
e does
> > > this, it still shows the #####'s and he has to physically go in and mo=
ve
> > > the column over ever so slightly to get it to print out correctly. =A0=
When
> > > there are numerous columns that have this issue, it is very time
> > > consuming. =A0Is there another way to correct this that is fast and ea=
sy
> > > rather than manually having to expand the column? =A0He also does not =
want
> > > to make all of the columns the same width as this would take up quite =
a
> > > bit more paper when printing out.
>
> > > PS =A0Throughout each column there are different font sizes.
>
> I would love to use this code as well, but i am getting an error. I am
> using Excel 2004 on Mac OS X Leopard. =A0The error i get is on this
> line... =A0Const Tolerance As Double =3D 1.1 =A0'10% extra room =A0- Synta=
x
> error?
>
> any ideas?
>
> Thanks in Advance,
> Aaron

FIXED IT!   had to remove the "extra room" comment.  very new to VBA,
simple mistake.
0
1/18/2008 7:57:16 PM
> > I would love to use this code as well, but i am getting an error. I am
> > using Excel 2004 on Mac OS X Leopard. The error i get is on this
> > line... Const Tolerance As Double = 1.1 '10% extra room - Syntax
> > error?
> >
> > any ideas?
> >
> > Thanks in Advance,
> > Aaron
>
> FIXED IT!   had to remove the "extra room" comment.  very new to
> VBA, simple mistake.

I've never used the Mac version of Excel so for my own knowledge... are you 
saying that VBA in Mac XL2004 doesn't allow for in line comments? I am 
surprised by that. Can you use comments (delineated by the apostrophe) by 
themselves on their own line?

Rick 

0
1/18/2008 9:02:58 PM
Reply:

Similar Artilces:

access 97 backend with 2000, 2002, and 2003 front ends
Is this possible to have the 97 users with 97 front end, 2000 users with 2000 front end, 2002 users with 2002 front end, and 2003 users with 2003 front end all linked up to an access 97 backend? We are currently planning on upgrading workstations with either 2000, 2002, 2003. the criteria for the specific version will depend on the IT department. I would like to know if we have several different office versions will it work to have access 97 as a back end?? thanks in advance jung That should work fine. Same rules as usual: make sure everyone has their own copy of the front end, preferably ...

Excel to PDF
When converting Excel workbook to Acrobat some sheets are dropped without giving any error messages. How can I fix this ? I am using windows 95, Office 97 and Adobe Acrobat 4. ...

How do I use a "subtract" function in Excel?
Hi Kelly if you want to subtract the value in B1 from the value in A1 and have the answer display in C1 then in C1 type =A1-B1 Hope this helps Cheers JulieD "Kelly" <Kelly@discussions.microsoft.com> wrote in message news:5DF4C83F-6BF1-40A8-BC8A-692058A5C70B@microsoft.com... > ...

Outlook 2003 and "Check Names"
Hi, We are testing Outlook 2003 at our office now and there is one very frustrating "feature" that is bugging all of us. When we create a new e-mail message and type in the first name of a person from the global address book and hit ctrl- k to check the name...we get a response that Outlook doesn't recognize the name and there are "no suggestions". The only way Check Name will successfully resolve the name is if we type it last name first (ie, Gates, Bill). This was not the case in Office XP or Outlook 2000. You could search by first name (or partial first name)...

Excel 2007
When I select cells to copy as a picture in Excel 2007, the resolution is terrible. Text and objects with shadow's are very blotchy when pasting the picture. How do you change the resolution of a 'Copy Picture'? ...

Input Excel 'Password to Open' through control in access form
Hi All, We know,Excel has prompt password to open it files. Is it possible to create a code that can supplies the excel prompt password?.So that when we open the excel file through our access control in a form, the excel files can be opened automatically.But when the excel files opened from its default icon,it will prompt a password first. ...

Counting number of X's in a column
I need to sum up the number of "Xs" in a column. I would be extremely grateful if someone could help me with the formula. I cannot seem to get one to work. We are using Excel 2003. Thank you. -- Susie Harris Operations Manager Environmental Education Association of Washington =COUNTIF(A:A,"X") -- HTH RP (remove nothere from the email address if mailing direct) "Susie Harris" <SusieHarris@discussions.microsoft.com> wrote in message news:FFA0FB17-C922-48A8-B3C3-0D487C1E6F6A@microsoft.com... > I need to sum up the number of "Xs" in a col...

Lookup based on criteria in 2 columns
Hi, I am trying to use a vlookup or other function to return the value in the amount column based on the location and date. Here is a sample of my data: Location Date Amount 101 9/15/8 10 101 9/16/8 20 101 9/17/8 15 102 9/15/8 50 102 9/16/8 75 102 9/17/8 67 For example if I wanted to return the amount for location 102 on 9/15/8, what formula would I use? I tried using variations of vlookups but had no luck. Thanks, =SUMPRODUCT(--(A2:A50=102),--(B2:B50=DATE(2008,9,15)),C2:C50) -- Regards, Peo Sjo...

Outlook 2003 keeps crashing #2
I get this message when I look in System information. Outlook keeps crashing quite often. I cannot for example delete two messages without outlook crashing. My colleagues do not have this problem. We are using the Microsoft mail exhange server. Faulting application outlook.exe, version 11.0.5510.0, stamp 3f1380f0, faulting module mso.dll, version 11.0.5606.0, stamp 3f334cce, debug? 0, fault address 0x003b6e16. Does anyone has a solution?=20 Best regards/ Bj=F6rn 1) I would definitely apply Service Pack 2for Office 2003 + applicable critical security updates. 2) Have you tried starting O...

Password Issue with MS Money 2003
Hello, I am not familiar with newsgroups but I hope it is a forum to seek assistance. I am unable to reach MS support via email from my home computer on this issue. My Money 2003 requires a net passport password to open my account in Money that I have successfully accessed for approximately 12 months. It does not recognize my password now. I have attempted several times with my existing password, changed my net passport password, even uninstalled and re- installed MS Money 2003 to gain access to my account. Nothing has worked. Each time it states I have failed to enter the corr...

Exchange 2003 new install can not receive external email.
I have just setup a new Windows Server 2003 standard edition with Exchange 2003 standard edition on it. I have been working for a while trying to get it to receive external email. I can send out and send/ receive internal messages, but when someone trys to send me a message from outside our network they get the following returned mail message This Message was undeliverable due to the following reason: Each of the following recipients was rejected by a remote mail server. The reasons given by the server are included to help you determine why each recipient was rejected. Recipient: <**...

Excel not Access
I have designed an Access database that holds records relating to my stores audit results going back for about 5 years plus a load more information relating to these stores. This was used to produe a pack once a month, however a change in senior management means that I have got to shelve this and prodce a similar pack in Excel. The idea would be that the user could select a month or a 12 mnth date range that would produce data that could then be used to populate a number of excel templates that have been designed. Having not used excel for years I would be grateful for any suggestion...

Auto-format in Microsoft Excel.
Each time i try to enter a number range, for example, 8- 10, in Excel, it constantly re-formats it to a date. If I change the formatting to "General" it turns it into a random number, usually 38209. I would like to turn off ALL auto-formatting, but that's probably asking too much. How do I disable this frustrating feature? thanks. Hi Paul When you enter "8-10" in a cell, that's not strictly a number but Excel thinks you mean a date so converts it as such. A date is a number and in your example the number 38209 represents August 10 2004 which is not a ra...

Outlook 2003
Hello, we have one client pc with Outlook 2003 where the following problem occurs: if a mail is replied from a user created sub folder of the inbox, the reply will not appear in sent mails, but will end up in the same sub folder, sender and recipient appear as identical. The mail goes out properly though, it's just that Outlook sets internally sender = recipient and bounces the reply back to the subfolder in which the original mail is stored. This happens on a Win 2000 machine with SP4 and all updates, the other clients use Outlook 2000 or XP and there is no such problem. There are no ru...

[Exchange 2003] Mail enabled public folder and sender address
I have a Windows 2003 domain with a native mode Exchange 2003 organization; there are some mail enabled public folders. When a user replies to a message in a public folder, the outgoing mail's sender address is the user's one; I want it to be the public folder's one, or at least I'd like the "reply-to" address to be set to the public folder's. How can I accomplish this? Thanks Massimo You would need to grant the user permissions to be able to Send As the public folder. By default, when you reply to a message that is in a PF, the PF is not composing the ...

help with simple maths in excel
I want to do a simple arithmatic excercise in excel for my grand daughter. It is stuff like 2+2 =4 Smart me has hit a problem at the first hurdle... I need to put 2 in one cell the + in another cell and then 2 in another = in another and then she puts the answer in the next one. So the above would have 4 cells completed and she would put the answer in the 5th one. When I use the + or = sign in a cell of its own it (excel) thinks I am doing an equation, is there a way around this? I will work on the answer like if she gets it correct or wrong how I will do that...a sound or som...

Opening Excel Workbooks
I'm running into an issue where if I click on an Excel file through My Documents, it doesn't automatically bring it up. I get the toolbar but the actual spreadsheet doesn't appear on the screen. I have to click on the taskbar to get it to pop up. If I already have Excel active and I open a file through Excel, this doesn't happen. Any ideas? Here is a similar thread: http://www.excelforum.com/showthread.php?s=&threadid=237195 Rolli -- Message posted from http://www.ExcelForum.com Hi, Take a look at Tools-Options-General tab- uncheck ignore other application...

Unexpected error message on closing an Excel file
Suddenly I am getting the following message when I try to close a workbook: "Your formula contains an invalid external reference to a worksheet. Verify that the path, workbook, and range name or cell reference are correct, and try again" The mysterious thing is that it does not happen consistently and that, after I click OK after the above message, I can still save the file. What might be the cause of this error message and can the "invalid reference" be tracked down using one of the utility add-ins such as J. Walkenbach's PUP? If it only happens when you close ...

How to keep format when importing Excel into SQL.
Can anybody help me please? When I import Excel file into SQL, a field that formated as 0000000000 (custom), loosing leading zeros. I tried to change data type in SQL after importing. No luck. I appretiate any help. See if using IMEX=1 helps: http://pratchev.blogspot.com/2007/10/importing-excel-data-into-sql-server.html -- Plamen Ratchev http://www.SQLStudio.com Plamen, I tried this, but got an error: "The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered." Thank you very much for looking into this. "Plamen Ratchev" wr...

How to change font size on formula bar in Excell 2007
I don't find Tools>Options>General (as suggested in other post answers) in Excel 2007. On the Office button there is an Excel Options but it doesn't provide a method of changing font size on the office but. My font is so small I can barely see it. Office button>ExcelOptions>Popular tab>in the "When creating new workbooks" section, choose font and font size -- Kind regards, Niek Otten Microsoft MVP - Excel "jimwillie" <jimwillie@discussions.microsoft.com> wrote in message news:588AAC05-0F52-404E-AA01-128E70E02D0B@microso...

How do I use traffic lights in excel
I am wanting to use traffic lights in excel that change colour based on the result of a variance cell, ie if the result of the cell is 10 make the traffic light green, if it is 20 make the traffic light amber, if the result is 30 make the traffic light red. How do I do this? Shorty Format>Conditional Formatting>Cell Value is: Note: you can add up to 3 conditions(4 if you count default) Gord Dibben Excel MVP On Wed, 22 Dec 2004 16:35:03 -0800, Shorty <Shorty@discussions.microsoft.com> wrote: >I am wanting to use traffic lights in excel that change colour based on the &g...

Addressing within Exchange 2003
We are running Exchange 2003 SP2. We setup an MX record for a external email(alumni.cup.edu) these mailboxes do not exist within our exchange org. But when we send email to these externals email mailboxes we are getting the following NDRs: #5.5.0 smtp;550 Mailbox unavailable. #5.4.0 Is there a way in exchange to ignore these email address so that we don't get the NDR from within our Exchange Org? On Fri, 4 Aug 2006 08:08:02 -0700, Sabo, Eric <sabo_e@cup.edu> wrote: >We are running Exchange 2003 SP2. We setup an MX record for a external >email(alumni.cup.edu...

how do i add "Software Digrams" Folder in my Visio 2003
how do i add software diags folder in visio 2003 version. Like if i go to File->New it shows folders like brainstorming, project schedule, block diagrams but in my case its missing the Software Diags folder which contains activity diags, web mock ups, use case diags etc. please let me know how to get that template. thanks. Ankur What edition of Visio are you using? Check by going to the About Microsoft Office Visio dialog from the Help menu. "Ankur" <Ankur@discussions.microsoft.com> wrote in message news:F0D10BF0-A059-4A9C-B615-B99F3916F4E5@microsoft.com... > how...

How To Copy MS Word mailing labels into Excel
I have a word doc that I want to put into Excel. I want to add some more fields to the names and addresses. Is this simple or do I have to learn how to program? Michael Rodriguez City of Grand Prairie Michael, have you tried to copy and paste the data into excel? -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Michael Rodriguez" <mrodrigu@gptx.org> wrote in messa...

Install Exchange 2003 Server on new Hardware with same name
I got a new server to move my Exchange Server Installation. I want to keep the name I'm using now for my Server. Already read TechNet Article "How to Move Exchange Server 2003 to New Hardware and Keep the Same Server Name". Is there anything else that I should be aware of that is not on this TechNet article? I'm using a different Disk Configuration, does this matters? Should this be a smooth process? Thanks for any help you can give. The drive letters MUST match, because the paths of the databases are at the Active Directory. The disks can have different sizes than the or...