Columns.Autofit not doing what I want

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

. . . and maybe Excel doesn't behave like I want, but if anyone can help
me, I'd appreciate it. What I want is the column to fit a logical word or
group. But I have A7X-00090, and AutoFit makes it fit the A7X-, squeezing
the 00090 to another line. Similarly, a header is Identification, but it
breaks between the last t and i because that's the longest whole word in the
column under that header. Is there any way to tell Excel what I want
besides setting individual column widths by size number?

Ed
 
It seems as if the problem cells are being ignored for Autofit purposes. Do
they have Wrap Text selected under Format, Cells, Alignment?

--
Jim Rech
Excel MVP
| . . . and maybe Excel doesn't behave like I want, but if anyone can help
| me, I'd appreciate it. What I want is the column to fit a logical word or
| group. But I have A7X-00090, and AutoFit makes it fit the A7X-, squeezing
| the 00090 to another line. Similarly, a header is Identification, but it
| breaks between the last t and i because that's the longest whole word in
the
| column under that header. Is there any way to tell Excel what I want
| besides setting individual column widths by size number?
|
| Ed
|
|
 
Jim, that was it! Now the columns are wide enough. BUT . . .
rngWork.Columns.AutoFit = True throws an error - "Object required", but the
columns are AutoFitted?!?

Ed
 

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

Back
Top