View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Find Last duplicate value in Column A

Sub FindLastDuplicate()
dim lastrow = cells(rows.count,1).End(xlup).row
for i = lastrow to 2 step -1
if application.countif(Range("A:A"),cells(i,1)) 1 Then
Range("B1").Value = cells(i,1)
exit sub
end if
Next
End Sub

Would be a code approach. Are you looking for a formula instead?

--
Regards,
Tom Ogilvy


" wrote:

How do I find last duplicate value in Column A and put it in a cell
B1?

Appreciate all help