Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the following sub to act as a

Status
Not open for further replies.

Yogi39

Technical User
Jun 20, 2001
273
0
0
CA
Using the following sub to act as a filter....
I have about 5000 records.
This sub is low...!
is this the fastest way to show and hide rows based on the same logic of the below cod ?
can I incorporate the logic in a filter ?

Code:
Sub OptionButton3863_Click()
Dim rr As String
Application.ScreenUpdating = False
For Each r In Sheets("Master").Range("A:A")
If r.Row > 3 Then
If r = "" Then Exit For
    If IsNumeric(r) And r < 2000 Then
    r.EntireRow.Hidden = True
    Else
    r.EntireRow.Hidden = False
    End If

    If Not IsNumeric(r) Then
    rr = r.Value
    If GetDigits(rr) < 2000 Then
    r.EntireRow.Hidden = True
    Else
    r.EntireRow.Hidden = False
    End If
    End If
    
End If
Next
Application.ScreenUpdating = True
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top