title: Deleting Specific Cells Excel
body: <p>What I'm trying to do is have the program go through is find a certain value from within a column of cells and see if it matches with one cell after I special paste the value, and if there is a match delete the associated cell and its row of cells. What is happening is that the special pasting part of the program is working, but the associated cells are not being deleted. To clarify, I'm trying to delete a whole row from a certain column based on whether there's a match</p>
  
  <pre><code>Dim j As Integer
  Dim i As Integer
  i = 2
  Dim Aud_Tot As Integer
  Aud_Tot = Application.InputBox("How big is your audit", , , , , , , 1)
  Do While True
      If Cells(i, 1).Value &lt;&gt; "" And Not IsError(Cells(i, 2).Value) Then
          Range(Cells(i, 1), Cells(i, 22)).Copy
          Range(Cells(i, 1), Cells(i, 22)).PasteSpecial xlPasteValues
          For j = 2 To Aud_Tot
              If Cells(j, 24).Value = Cells(i, 2).Value Then
                  Range(Cells(j, 24), (Cells(j, 42))).ClearContents
              End If
          Next j
          i = i + 1
      Else
          Exit Do
      End If
  Loop
  </code></pre>