Elimating Duplicate Entries

Houstonwolf

Board Regular
Joined
Jul 28, 2006
Messages
154
Hello. I am trying to truncate an existing report to make it more usable for my department's needs. You can see that the attached report contains multiple entries for the Trl# in Col D. I only need the trailer listed once (to another worksheet would be fine or I could delete all repeated instances of the Trl# in D providing any instance remained in the worksheet once and only once).

Any ideas as to how this can be done?
DV02 Report.xls
CDEFGHIJ
1SCACTrl#Part#HPWO#SchdShipDateActualShipDateSchdDelDateApptDate
2SWFT500961Q5933A#ABA100039299209/01/0609/01/0609/06/0609/06/06
3SWFT500961Q7822A#ABA100039301109/01/0609/01/0609/06/0609/06/06
4SWFT500961Q5985A#100039325509/01/0609/01/0609/06/0609/06/06
5SWFT500961Q6500A#ABA100039326009/01/0609/01/0609/06/0609/06/06
6SWFT500961Q6503A#ABA100039326509/01/0609/01/0609/06/0609/06/06
7SWFT500961Q5987A#ABA100039326609/01/0609/01/0609/06/0609/06/06
8SWFT500961Q5927A#ABA100039330709/01/0609/01/0609/06/0609/06/06
9SWFT500961Q6455A#ABA100039335109/01/0609/01/0609/06/0609/06/06
10GRSF4176Q3714A#ABA100039293909/01/0609/01/0609/04/0609/04/06
11GRSF4176Q3715A#ABA100039294009/01/0609/01/0609/04/0609/04/06
12GRSF2102Q3944A#ABA100039330109/01/0609/01/0609/06/0609/06/06
13CTRQ33271Q3714A#ABA100039293909/01/0609/01/0609/04/0609/04/06
14CTRQ33271Q3944A#ABA100039330109/01/0609/01/0609/04/0609/04/06
15CTRQ13379Q5927A#ABA100039298409/01/0609/01/0609/04/0609/04/06
16CTRQ13379Q6500A#ABA100039326009/01/0609/01/0609/04/0609/04/06
17CTRQ13379Q5987A#ABA100039326609/01/0609/01/0609/04/0609/04/06
18CTRQ13379Q6455A#ABA100039335109/01/0609/01/0609/04/0609/04/06
19CEPA4776Q6455A#ABA1000392948-109/01/0609/01/0609/04/0609/04/06
20CEPA4776Q5927A#ABA100039298409/01/0609/01/0609/04/0609/04/06
SEP 06
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

SteveO59L

Well-known Member
Joined
Apr 21, 2004
Messages
7,896
Try using an advanced filter, with the "Copy to another Location" and "Unique Values" options
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello

Is this suitable?

Code:
Sub copy_to_sheet()
For MY_ROWS = 1 To Range("D65536").End(xlUp).Row
    If Range("D" & MY_ROWS).Value <> Range("D" & MY_ROWS + 1).Value Then
        Rows(MY_ROWS).Copy
        Sheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial (xlPasteAll)
    End If
Next MY_ROWS
End Sub
 

Houstonwolf

Board Regular
Joined
Jul 28, 2006
Messages
154
The filter was easy enough! Thank you! :biggrin:

Adrafter, the SUB routine is more than I need now, but I'm saving your code to try it out for some other things I'm trying to do. Thanks!
 

Forum statistics

Threads
1,136,421
Messages
5,675,759
Members
419,585
Latest member
popsin

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