Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.Columns(3).Cells
If cell.Value = cell.Offset(, 1).Value Then cell.EntireRow.Delete
Next cell
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 so that whenever i run the code it should work on sheet1 plz set worksheet to sheet1 and i need a code without button
yes belleke i am doing the same and this code is working also but what i want is mentioned sheet1 name, target sheet1 in ur code so that if i am in any sheet for example if i am in sheet6 and i run this code then it should work on sheet1 only thats my moto and that's what i want so plz look into it and do needful