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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try using an advanced filter, with the "Copy to another Location" and "Unique Values" options
 
Upvote 0
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
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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