Results 1 to 3 of 3

Delete rows with specific value in multiple Columns

Threaded View

dagindi Delete rows with specific... 04-20-2010, 01:31 PM
mdbct Re: Delete rows with specific... 04-20-2010, 02:41 PM
dagindi Re: Delete rows with specific... 04-20-2010, 04:59 PM
  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Delete rows with specific value in multiple Columns

    I found the following code on online:

    "Delete rows with specific value in Column A and on same row specific value in column B "

       Sub Delete_rows_based_on_ColA_ColB()
          Application.ScreenUpdating = False
          Application.Calculation = xlCalculationManual
          Dim cell As Range, rng As Range, i As Long
          Set rng = Columns("A").SpecialCells(xlConstants, xlTextValues)
          For i = rng.Count To 1 Step -1
             If LCase(rng(i).Value) = "standard" _
                  And LCase(rng(i).Offset(0, 1).Value) = "card" _
                    Then rng(i).EntireRow.Delete
          Next i
          Application.Calculation = xlCalculationAutomatic
          Application.ScreenUpdating = True
        End Sub

    I need help recoding it (if possible) so that it looks at all rows and if Column F, G, & H are <=0 then the row gets deleted, but all three columns (F, G, & H) MUST be <=0

    As a side request, I cant figure out in the original code where you would enter the "specific value" to look for in A & B.
    Last edited by dagindi; 04-20-2010 at 05:00 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