Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dlh dlh is offline
external usenet poster
 
Posts: 2
Default Show which entries in Search Table duplicates or triplicets

We have a parking problem. We write down license numbers of cars in the lot
at various times on various days. There are hundreds of entries. Now we
sort by license and see which cars have been here before, or which have NEVER
moved. I need a report of JUST the duplicate, triplicate or multiple
occurrences. IOW, if the entry is there more than once, I need to extract
that entry as a DOUBLE or a TRIPLE or worse. THen we target those worse
offenders
How can I do this with a defined range of date-time-license no-lot (we have
several lots). Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Show which entries in Search Table duplicates or triplicets

I flicense plate number are in Sheet5 column A, then in Sheet6 column A will
be the duplicate plate numbers and in column B will be a count of the number
of times the license plate was found. Code assumes no header rows and the
plates in sheet 5 are sorted.

Sub getduplicates()

NewRowCount = 1
OldRowCount = 1
StartRow = 1
With Sheets("Sheet5")
Do While .Range("A" & OldRowCount) < ""
If .Range("A" & OldRowCount) < _
.Range("A" & (OldRowCount + 1)) Then

If OldRowCount - StartRow = 1 Then
'Duplicatge copy to new sheet
License = .Range("A" & OldRowCount)
Occurances = OldRowCount - StartRow + 1
With Sheets("Sheet6")
.Range("A" & NewRowCount) = License
.Range("B" & NewRowCount) = Occurances
NewRowCount = NewRowCount + 1
End With
End If
StartRow = OldRowCount + 1
End If
OldRowCount = OldRowCount + 1
Loop
End With

End Sub

"DLH" wrote:

We have a parking problem. We write down license numbers of cars in the lot
at various times on various days. There are hundreds of entries. Now we
sort by license and see which cars have been here before, or which have NEVER
moved. I need a report of JUST the duplicate, triplicate or multiple
occurrences. IOW, if the entry is there more than once, I need to extract
that entry as a DOUBLE or a TRIPLE or worse. THen we target those worse
offenders
How can I do this with a defined range of date-time-license no-lot (we have
several lots). Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
list of entries from a column without duplicates rpick60 Excel Worksheet Functions 5 December 10th 07 12:27 AM
pivot table duplicates numbers under 'drop down show all'? scraig Excel Discussion (Misc queries) 1 June 23rd 06 01:02 AM
My pivot table field list show duplicates Kay Excel Discussion (Misc queries) 0 December 6th 05 09:49 PM
Summing duplicate entries and non duplicates Big H Excel Programming 13 September 18th 05 12:01 AM
Copy multiple entries and paste without duplicates ExcelMonkey[_116_] Excel Programming 2 May 13th 04 09:45 PM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"