View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
O&O O&O is offline
external usenet poster
 
Posts: 2
Default Hide Column - With text in cell

Thxs - but how about Sheet1 &Sheet2 &Sheet3
thxs
Bob Phillips wrote:
Sub Test1()
Dim cell As Range
For Each cell In Range("c1:j1")
If cell.Value < "AAA" Then
cell.EntireColumn.Hidden = True
End If
Next cell
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"O&O" wrote in message
oups.com...
How can I make this macro work if my cells contain a text e.g AAA
instead of 0 & work on Sheet1, Sheet2 & Sheet3

Sub Test1()
Dim cell As Range
For Each cell In Range("c1:j1")
If cell.Value < 0 Then
cell.EntireColumn.Hidden = True
End If
Next cell
End Sub

Thxs