help with logical expressions should be simple fix

dusty

Registered User.
Local time
Today, 07:07
Joined
Aug 20, 2009
Messages
42
Here is the code


Sub Show_packaging()
'To hide columns without 2 in specific row
Dim col As Range
With ThisWorkbook.Sheets("Engineering")
For Each col In .Range("E3:CW3").Columns
col.EntireColumn.Hidden = _
Application.Sum(col) < 2 or > 2
Next

End With
End Sub

however I get a compile error when I write < 2 or >2

ive tried < 2 <

surely this must be a simple fix

Thanks Dusty
 
its ok fixed it th eonly one I didnt try

<> 2 sods law :D
 

Users who are viewing this thread

Back
Top Bottom