J
joemeshuggah
is there a way to loop through cells and hide them if the cell value is not
in an array?
eg.
HideArray = Array("Test","Test2")
For i = LC To 4 Step -1
Cells(4, i).Select
ColRef = Left(ActiveCell.Address(0, 0), (ActiveCell.Column < 27) + 2)
If Cells(4, i).Value <> (HideArray) Then
Range(ColRef & "1:" & ColRef & 65536).Hidden = True
End If
i get an error message on the line of code " If Cells(4, i).Value <>
(HideArray) Then"
in an array?
eg.
HideArray = Array("Test","Test2")
For i = LC To 4 Step -1
Cells(4, i).Select
ColRef = Left(ActiveCell.Address(0, 0), (ActiveCell.Column < 27) + 2)
If Cells(4, i).Value <> (HideArray) Then
Range(ColRef & "1:" & ColRef & 65536).Hidden = True
End If
i get an error message on the line of code " If Cells(4, i).Value <>
(HideArray) Then"