Hi,

In column A I have duplicate names and in column B they have different values associated, what I need to do is display only column A's duplicates with there associated value from column B on sheet 2.

I'm using excel 2003 and vba is my preferred solution.

Here is some of what I have but it is not working.

Sub test()

 Dim rnge As Range, CellPtr As Range
    Set rnge = ActiveSheet.Range("A2", Cells(Rows.Count, "A").End(xlUp))
 
    For Each CellPtr In rnge
        If Len(CellPtr.Value) > 0 Then
            CellPtr.Offset.Formula(0, 2) = "=IF(COUNTIF($A$2:$A$1001,A2)>1,"duplicate","")"
         End If
    Next CellPtr


' now select all rows with duplicate in column C and place in sheet2

End Sub
Thanks