Problem removing duplicate rows all columns due to time stamp.

aneer miss

New Member
Joined
Nov 28, 2010
Messages
13
Hi

I have deleted all duplicate rows based on all columns within a range using the "data" tab and "remove duplicates" function on it (using 2007). It doesn't appear to work as several rows are exactly the same to the naked eye.

Column Q is populated using the following code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Static t As Date, iRun As Boolean
If Not iRun Or (Now - t) * 86400 < 180 Then
    iRun = True
    t = Now
    Range("A7:P7").Copy Destination:=Sheets("Updated").Range("A" & Rows.Count).End(xlUp).Offset(1)
    Sheets("Updated").Range("q" & Rows.Count).End(xlUp).Offset(1).Value = Now
End If
End Sub

I tried formatting a cell in the last column (Q) - "8/03/2011 15:25" - to "Time" and it became -<TABLE style="WIDTH: 87pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=116><COLGROUP><COL style="WIDTH: 87pt; mso-width-source: userset; mso-width-alt: 3811" width=116><TBODY><TR style="HEIGHT: 14.95pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 87pt; HEIGHT: 14.95pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl65 height=20 width=116 align=right>3:25:44 PM</TD></TR></TBODY></TABLE> I found that it actually contains "seconds" as well as hours and minutes.

Would this be why the remove duplicate rows is not working.

How would I be able to fix it, so that remove duplicate rows is based on date, hours and minutes for column Q?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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