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
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