0

I have to delete the row if two column values are same. If Column B and Column D Values are same Then I have to delete that row. I am using one method but it is taking so much of time. Is there any other way to do it

Dim i As Long
For i = lngLstRow To 1 Step -1
    If Range("B" & i).Value = Range("D" & i).Value Then
    Rows(i).EntireRow.Delete
Scott Craner
  • 148,073
  • 10
  • 49
  • 81
  • Use the helper function in the linked answer to `Union` all the rows together and then delete in one step at the end. In your case use `EntireRow` instead of `EntireColumn` when deleting. – BigBen Mar 09 '21 at 18:41
  • Hi , I have see that topic , Could you please elaborate the same? – karan arora Mar 10 '21 at 06:17
  • I am not able to get how I should implement the same in my code – karan arora Mar 10 '21 at 07:56

0 Answers0