hide rows with specific value - TechRepublic
Question
July 8, 2008 at 06:01 AM
chilu32

hide rows with specific value

by chilu32 . Updated 18 years ago

Hi , i am trying to hide rows in my worksheet that hav 0% in a certain column , problem is that i need 2 decimal places and if i have 20.0% then it hides that row as well.Please help !!
here is the code i am using:
Dim ZoekIn As Range, Vind As Range
Dim Celtel As Range

With ActiveSheet.Columns(7)
Set ZoekIn = .Find(“0.0%”)
If Celtel Is Nothing Then
Set Celtel = ZoekIn
End If
If Not ZoekIn Is Nothing Then
Set Vind = ZoekIn
Do
Set Celtel = Union(Celtel, ZoekIn)
Set ZoekIn = .FindNext(ZoekIn)
Loop While Not ZoekIn Is Nothing And ZoekIn.Address <> Vind.Address
End If
End With

Celtel.EntireRow.Hidden = True

This discussion is locked

All Comments