• 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.

Delete a row by comparing two cells,

Hi Arun,


Welcome to Chandoo!


The information you've provided is not sufficient!

a. Column A is used to find last row

b. Column A and Column B are used to check if they are blank.

[pre]
Code:
Sub Macro1()
Application.ScreenUpdating = False
For i = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
If Len(Range("A" & i).Value) = 0 And Len(Range("B" & i).Value) = 0 Then
Rows(i).Delete
End If
Next i
Application.ScreenUpdating = True
End Sub
[/pre]

Better approaches can be worked out but for that you need to inform us about your layout, columns you need to check etc.
 
Back
Top