Results 1 to 3 of 3

Delete multiple rows of data based on criteria in a single cell

Threaded View

  1. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    860

    Re: Delete multiple rows of data based on criteria in a single cell

    Try this code once a testfile.


    Sub tst()
       Dim i As Integer, cl As Variant
        For i = Cells(Rows.Count, 3).End(xlUp).Row To 1 Step -1
          For Each cl In Range(Cells(2, 3), Cells(Cells(Rows.Count, 3).End(xlUp).Row, 3))
        If cl = "do not call" Then
            cl.Offset(-1).Resize(4).EntireRow.Delete
         End If
        Next cl
      Next i
    End Sub
    Last edited by HSV; 03-11-2011 at 04:27 PM.
    Harry.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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