Microsoft
Software
Hardware
Network
Question : Excel Duplicate Removal Help!
Hi i have a spreadsheet with about 15,000 rows in each and i need to remove the duplicates down the rows... the rows currently appear as following:
Yahoo-Airparks-Button-88x3
1 2/13/2003 12:43:43 PM 36
Yahoo-Airparks-Button-88x3
1 2/13/2003 12:44:44 PM 36
Yahoo-Airparks-Button-88x3
1 2/13/2003 12:44:58 PM 36
Yahoo-Airparks-Button-88x3
1 2/13/2003 3:18:05 PM 58
Yahoo-Airparks-Button-88x3
1 2/13/2003 3:18:21 PM 58
Yahoo-Airparks-Button-88x3
1 2/13/2003 3:19:03 PM 58
The first part Yahoo being one row, the second part being the date, the third part being the time, and the 4 part being the amount. The amount is the duplicate bit, i need to remove all the rows following the first 36 and first 58 etc. so that it is left with just one.
Can anyone give me any ideas on how this can be done?!
Thanks a lot
Dom
Answer : Excel Duplicate Removal Help!
I so Wou have some blanck row so You should use this one that jump to the next one when it finds a empty row. Change the 65535 with the no of last row.
Sub test1()
temp = 0
For a = 2 To 65535 ' ~~~~~ look in all cells to find tha last one
If Worksheets("sheet1").Cells
(a, 4) > 0 Then
If Worksheets("sheet1").Cells
(a, 4) = temp Then ' ~~~~~ verify if date has appeared exaclly before
Rows(a).Select '~~~~~ if the value is duplicate consecutivelly then delete that row
Selection.Delete Shift:=xlUp
a = a - 1 ' decrease the controle because You deleted a row and You don't whant to miss a row
Else
temp = Worksheets("sheet1").Cells
(a, 4)
End If
End If
Next a
End Sub
You can change the sheet1 with the name of Your sheet
What is the progress?
Random Solutions
Vista Network Drive - Application Not Found
OUTLOOK 2003 RETURNS THIS ERROR MESSAGE WHEN ATTACHING A PDF FILE - MICROSOFT OFFICE WORD, THE OPERATION FAILED
executing commands after telnetting to a server on listening defined port
Mailto hyperlinks open in explorer instead of outlook
Microsoft, Access, 2003, VBA, Make a record found in a recordset the current record of a form
CAST(MONTH(DDate) AS VarChar(20)) need two digits not one.
"regexp" in Tcl Scripts
Cannot email bellsouth.net addresses.
VBA
Overwrite existing default SMTP certificate on Exchange 2007