View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Get Autofit in Excel to format just part of a column?

David,
No, the column can only have a single width.
But you can select which cell is used as the base for .AutoFit. e.g.

Range("A1").Value="This is long, long, long, long string"
Range("A2").Value="Short string"
Range("A2").Columns.AutoFit
gives a different column width to
Range("A1").Columns.AutoFit

NickHK

"Dlegrand" wrote in message
...
Is it possible, using VBscript, to get Autofit to format only part of a
column when building an Excel spreadsheet?
--
David Legrand