View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Invoice[_2_] Invoice[_2_] is offline
external usenet poster
 
Posts: 10
Default Hide column if particular cell is NOT a certain value

Thanks, Gary. Now, if you don't mind helping out some more, I still have a
problem with this code and that is that whenever I enter the AG:IV range, the
hidden columns reappear.

"Gary Keramidas" wrote:

it should work if you change the = "Attendance" to < "Attendance"

--


Gary


"Invoice" wrote in message
...
Hi,

The following code is based on one I got from this forum. It hides all
columns in my worksheet from AG:IV if the value in row 37 is "Attendance". I
really need the flip side of this procedure as well, though, i.e., to hide
all columns from AG:IV if the value in row 37 is anything OTHER than
"Attendance". Can anyone help?

For a = 32 To 255
If Range("a37").Offset(0, a).Value = "Attendance" Then
Range("a37").Offset(0, a).EntireColumn.Hidden = True
Next a