Formula for checking duplicates?

Audiman

New Member
Joined
Sep 10, 2009
Messages
31
Hey Guys.. Back again to check with the experts.

I have a list of 43,000+ part numbers. Some are duplicated, some are not. It would take me hours to go through and remove the duplicates and even then it may still contain duplicates. Is there some formula using arrays that I can use that will only take 1 of the part numbers in Cell A?
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Chip Peason has a Macro that will do that here
You can also use Advanced Filter

lenze
 

aysam

Board Regular
Joined
Jun 24, 2009
Messages
213
You may use this code (NOT MINE)
Code:
[B]Sub RemoveDupes()[/B]
    'Add extra Column, "A" becomes "B"
    Columns(1).EntireColumn.Insert 
   'Filter out duplicates and copy unique list to "A"  
  Range("B1", Range("B65536").End(xlUp)).AdvancedFilter_ 
   Action:=xlFilterCopy, CopyToRange:=Rang("A1"),Unique:=True 
   'Add extra Column, "B" becomes "A"
    Columns(2).EntireColumn.Delete
[B]End Sub[/B]
</PRE>
 
Last edited:

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,213
Advanced Filter, Unique Records is a great method.

If you needed a formula:

Here's the set up:
Excel Workbook
ABCD
1Part #Count UniquePart #States
243-444543-444
344-58444-584
443-44438-dsw
538-dsw323-312
6323-3123333
73333
838-dsw
9
10
2003
Excel 2010

Here's the formula in cell C2 that is entered with keystrokes Ctrl + Shift + Enter:

=SUM(IF(FREQUENCY(IF(A2:A8<>"",MATCH("~"&A2:A8,A2:A8&"",0)),ROW(A2:A8)-ROW(A2)+1),1))

Here's the formula in cell D2 that is entered with keystrokes Ctrl + Shift + Enter and then copied down:

=IF(ROWS(D$2:D2)>C$2,"",INDEX($A$2:$A$8,SMALL(IF(FREQUENCY(IF($A$2:$A$8<>"",MATCH("~"&$A$2:$A$8,$A$2:$A$8&"",0)),ROW($A$2:$A$8)-ROW($A$2)+1),ROW($A$2:$A$8)-ROW($A$2)+1),ROWS(D$2:D2))))
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,731
Messages
5,513,073
Members
408,936
Latest member
savageanman

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top