Question Locked

hide rows with specific value

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

2 replies

by mr.sweetchuck

Hi,
Not sure which PL that is but, why not try finding rows with a value of less than (<) 0.01 or 0.1%, whichever is more appropriate.

chuck

This discussion is closed to new replies.