View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
vicky vicky is offline
external usenet poster
 
Posts: 52
Default stuck with Auto column fit

hey i know about auto column fit.. but my only constraint is of
identifying cells which has ### values. i guess it has something to do
with range.text or range.formula .... if anyone could provide a
snippet of "identifying" such cells would be really helpful. i have
written this code but not doing the task i am expecting .

For Each cell In ThisWorkbook.Sheets(1).UsedRange
If IsError(cell) Then
cell.Select
Selection.Columns.AutoFit
cell.Interior.ColorIndex = 8
End If
Next cell