Results 1 to 4 of 4

Delete rows based on multiple criteria

Threaded View

couger77 Delete rows based on multiple... 01-17-2007, 01:39 PM
VBA Noob Hi, Does this link help ... 01-17-2007, 02:27 PM
couger77 That did it! Thanks! 01-17-2007, 03:28 PM
VBA Noob Glad it helped VBA Noob 01-17-2007, 03:29 PM
  1. #1
    Registered User
    Join Date
    12-29-2003
    Posts
    33

    Delete rows based on multiple criteria

    I have the following script which works great. I just need to be able to add multiple "what = " ie: what = "CGD" or "JAD" or "TUP"

    Any help appreciated!

    Begin script:
     
    Sub Find_ANN()
        Dim rng As Range
        Dim what As String
        what = "CGD"
        Do
            Set rng = ActiveSheet.UsedRange.Find(what)
            If rng Is Nothing Then
                Exit Do
            Else
                Rows(rng.Row).Delete
            End If
        Loop
    End Sub
    Last edited by VBA Noob; 01-17-2007 at 02:14 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1