Hi guys, For some reason, the Else command gives error, "Compile error: Else without If"; even though I have given If in the previous line Any idea how I should make this work? This macros is just to find rows where both D and F columns are identical to respective columns in other rows, and then delete the later row. x = ActiveCell.Row y = x + 1 Do While Cells(x, 4).Value <> "" Do While Cells(y, 4).Value <> "" If (Cells(x, 4).Value = Cells(y, 4).Value And Cells(x, 6).Value = Cells(y, 6).Value) Then Cells(y, 4).EntireRow.Delete Else: y = y + 1 End If Loop x = x + 1 y = x + 1 Loop End Sub Thank you, Ravi Yogarajan ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in the subject line. Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles *************************************************************