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:
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?
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?