This should do it

Sub CopySelectedCells()
 Dim str As String, rangeRow As Range
 With CreateObject("scripting.dictionary")
    For Each rangeRow In Selection.Rows
        If Trim$(Cells(rangeRow.Row, "I").Value) <> vbNullString Then
            If Not .exists(Trim$(Cells(rangeRow.Row, "I").Value)) Then
                .Item(Trim$(Cells(rangeRow.Row, "I").Value)) = Trim$(Cells(rangeRow.Row, "I").Value)
            End If
        End If
    Next
    str = Join$(.items, ",")
 End With
    MsgBox str
End Sub