Thread: Duplicate
View Single Post
  #2   Report Post  
Ian
 
Posts: n/a
Default

If the dulpicate cells are adjacent in the same column, try this macro. It
records all duplicate rows in another column. The comments should explain
it.

Sub find_dupes()
rr = 1 ' row to start recording results
rc=2 ' column to record results
c = 1 ' column to search (1=A, 2=B...)
For r = 2 To 12 ' rows to search (must start at minimum of 2)
If Cells(r, c) = Cells(r - 1, c) Then
Cells(rr, rc) = r
rr = rr + 1
End If
Next
End Sub

--
Ian
--
"philiphales"
wrote in message
...

I was sent a large spreadsheet full of data and needed to check the
validity of the info in a column.

I found that an item had been input in error - instead of the actual
figure the preceeding figure had been duplicated.

I highlighted this, but before finishing the page we had a powercut and
I lost the error.

I do not really want to check the whole thing again - it took 3 hours.

Is there any way of finding duplicate, but unknown data?

Like find all references of duplicate entries?

Cheers


--
philiphales
------------------------------------------------------------------------
philiphales's Profile:
http://www.excelforum.com/member.php...o&userid=18641
View this thread: http://www.excelforum.com/showthread...hreadid=465837