Duplicate Numbers in Column

shehla.uhp1

New Member
Joined
May 23, 2012
Messages
14
Hi,

I am looking for excel function that help me to delete duplicate part numbers in the column.

Thanks.
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
If you mean formula there is no such (you can check if you have duplicates in next column)but if your data are in column A use this VBA solution

Code:
Sub DeleteDups()
     
    Dim x               As Long
    Dim LastRow         As Long
     
    LastRow = Range("A65536").End(xlUp).Row
    For x = LastRow To 1 Step -1
        If Application.WorksheetFunction.CountIf(Range("A1:A" & x), Range("A" & x).Text) > 1 Then
            Range("A" & x).EntireRow.Delete
        End If
    Next x
     
End Sub
 

shehla.uhp1

New Member
Joined
May 23, 2012
Messages
14
If you mean formula there is no such (you can check if you have duplicates in next column)but if your data are in column A use this VBA solution

Code:
Sub DeleteDups()
     
    Dim x               As Long
    Dim LastRow         As Long
     
    LastRow = Range("A65536").End(xlUp).Row
    For x = LastRow To 1 Step -1
        If Application.WorksheetFunction.CountIf(Range("A1:A" & x), Range("A" & x).Text) > 1 Then
            Range("A" & x).EntireRow.Delete
        End If
    Next x
     
End Sub


I don't know about VBA.I am looking simple excel formula.

Thanks.
 

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
There is no formula that will delete duplicatates.
You can find duplicates using simple MATCH or try to use Remove Duplicates tool from Excel option.
Do not be afraid of VBA.
Press ALT+F11 go to the left hand side of the window and eter this code under sheet where you have got your data.
 

iyyi

Active Member
Joined
Jun 5, 2012
Messages
353
you can choose Data>Remove Duplicates from the excel menu.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,477
Messages
5,596,384
Members
414,063
Latest member
N_Bates

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
Top