View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Erik Creyghton[_3_] Erik Creyghton[_3_] is offline
external usenet poster
 
Posts: 6
Default formatting columns with formula results


"Mika Oukka" wrote in message
...
Hello Erik,

How about if you remove the label temporarily before autofitting:

Range("B1:D1").Select 'Assumed LabelRow = 1
For Each cell In Selection
OrigLabel = Cells(1, cell.Column).Value
Cells(1, cell.Column).Value = ""
Columns(cell.Column).EntireColumn.AutoFit
Cells(1, cell.Column).Value = OrigLabel
Next

Mika Oukka

Mika,

Yes it works, however if the label is wider than the autofit has allowed for
I run into the same problem restoring the label.

Erik