Results 1 to 3 of 3

Edit code to add extra criteria

Threaded View

duugg Edit code to add extra... 02-22-2008, 10:58 AM
VBA Noob Maybe Sub Find_ANN() ... 02-22-2008, 11:14 AM
duugg Hey noob, Thanks much, I... 02-22-2008, 11:34 AM
  1. #1
    Valued Forum Contributor
    Join Date
    04-11-2006
    MS-Off Ver
    2007
    Posts
    438

    Edit code to add extra criteria

    How do I make this formula include searching for "ann" and "john" (in separate cells)?
    Thanks

    Sub Find_ANN()
        Dim rng As Range
        Dim what As String
        what = "ann"
        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; 03-19-2009 at 05:37 PM. Reason: better title and a spelling error

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