• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

keep column d is greter than column b data and column d is lower than column j data and delete rest

Status
Not open for further replies.
keep column d is greater than column b data and column d is lower than column j data and delete rest data
 

Attachments

  • Book2.xlsx
    16.6 KB · Views: 8
Code:
Private Sub CommandButton1_Click()
Dim i As Long
    For i = Cells(Rows.Count, 4).End(xlUp).Row To 2 Step -1
        If Cells(i, 4) <= Cells(i, 2) And Cells(i, 4) >= Cells(i, 10) Then Cells(i, 2).EntireRow.Delete
    Next

End Sub



u have used this code and a button
but in my file i am not using button so changes are required
plz change and modify the code plz mentioned the target sheet in the code
 
Status
Not open for further replies.
Back
Top