You could just use ActiveSheet.UsedRange.EntireColumn.Autofit.
You can see if a cell displays all # characters something like this:
With Range("A1")
If Len(.Text) > 0 And Len(Replace(.Text,"#","")) = 0 Then
' cell contains all # characters
End If
End With
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
Go to the right-border in the Column Header of your ######## column
And double-click on it. This should expand the column width to accommodate
the necessary data.
Thanks, Jim- what I'm trying to determine is if there is a way to
detect this using VBA, so I can write a routine to widen columns. The
spreadsheet is locked to the users, so they won't be able to double
click on the column header, but I'd like them to be able to view their
data.
Dave O
Eschew obfuscation