Dear Mike, tons and tons of thanks to you....it works just like i wish for.
this is the final looks of the macro that i implement (see the blue comments)
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 ( instead of poping up the msgbox, i prefer the data in the clipboard, so i changed back to the original )
With New MSForms.DataObject
.SetText str
.PutInClipboard
End Sub
many thanks again mike
regards,
rampal
Bookmarks