Hide column if it contains text
Give this macro a try...
Sub HideNonNumericColumns()
Dim X As Long, WS As Worksheet
Set WS = ActiveSheet
For X = 1 To WS.UsedRange.Columns.Count
If Join(WorksheetFunction.Transpose(WS.UsedRange.Colu mns(X)), "") _
Like "*[!0-9]*" Then WS.Columns(X).Hidden = True
Next
End Sub
--
Rick (MVP - Excel)
"Jodie" wrote in message
...
I want to hide all columns containing text and leave the numeric columns
unhidden. Is there a macro that can be written for that?
--
Thank you, Jodie
|