I have about 30,000 names in a worksheet and want to be able to search for duplicates. In the past, I have sorted my columns and done a simple IF formula comparing the cell prior. This works well trying to copy the formula down to all 30,000 cells is a little tedious.
Thanks,
seemore
Last edited by seemore; 01-31-2011 at 01:16 PM.
Hi,
You don't need to sort your data. You could use an =COUNTIF($A1:$A30000,A1) and copy that down. Anything that returns > 1 is a duplicate. I don't see how you can avoid the copy down. You could write a simple Macro to do it. Assuming the =COUNT is in C1 just use
If all you want to do is establish the unique items then you could use a Data Filter Advanced to extract a unique list to a blank column.Range("C1").Copy Destination:=Range("C2:C30000")
HTH
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
You can mark the double items in column A:
Sub tst() Range(Join(Filter([transpose(if(countif(offset($A$1,,,row(A1:A30000)),A1:A30000)>1,address(row(A1:A30000),1),""))], "$"), ",")).Interior.ColorIndex = 14 End Sub
I didn't quite understand the the range commands but what did seem to work was when I used the =COUNTIF($A1:$A30000,A1) command and then used the filter to find anything that equaled 2. At that point, I just deleted all of the lines. That certainly seemed easier than trying to go through all 30,000 page by page. Thanks again for all your help. I guess I need more training on the advanced commands and etc.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks