Deleting entire duplicate rows

Ionisation

New Member
Joined
Oct 6, 2006
Messages
3
I have a document with over 1000 rows of data. Amongst this data are duplicate rows scattered between.

Can i find and delete these duplicate rows with one or two click?

Duvall
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
you could sort the data by the column containing the duplicate rows then run a vba If statment

Sub tst()



For n = 1 To 1000
If Cells(n, 1) = "" Then
End
Else
End If
If Cells(n, 1) = Cells(n + 1, 1) Then
Cells(n + 1, 1).EntireRow.Delete
n = n - 1

Else

End If

Next n
End Sub



Hope this is of some help

Stu
 
Upvote 0
What if you don't know for sure that there's 1000 rows of data? For example, some days there's 500 and some days there's 1500? I know there's always less than 5000, so I run a macro deleting rows from 1-5000, but the macro takes a long time to complete knowing that most of the rows it checks are completely blank. I could speed up the macro if it just looked at the rows that contained data - however, I'm not sure that any particular column will contain data (for example, Col A could be blank and Col B have data for one row, but in another it's switched). Thoughts?
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top