adapt this regular
Sub ptestp()
Dim ws1 As Worksheet, ws2 As Worksheet
Dim FoundOne As Range, LookInR As Range, LookForR As Range, c As Range
Dim nr3 As Long, fAddress
Application.ScreenUpdating = False
Set ws1 = Sheets("Sheet7")
Set ws2 = Sheets("Sheet8")
Set LookInR = ws1.Range("A2:A10")
Set LookForR = Range(ws2.Range("A2"), ws2.Range("A" & Rows.Count).End(xlUp))
For Each c In LookForR
With LookInR
Set FoundOne = .Find(What:=c, lookat:=xlPart)
If Not FoundOne Is Nothing Then
fAddress = FoundOne.Address
Do
FoundOne.Offset(0, 1).Value = c.Value & IIf(FoundOne.Offset(0, 1) <> "", ", ", " ") & FoundOne.Offset(0, 1)
Set FoundOne = .FindNext(After:=FoundOne)
Loop While FoundOne.Address <> fAddress
End If
End With
Next c
Set ws1 = Nothing
Set ws2 = Nothing
Set LookInR = Nothing: Set LookForR = Nothing
Application.ScreenUpdating = True
End Sub
Bookmarks