Hi
This will work from the spreadsheet provided.
You probably could do this directly from outlook. There are quite a few examples with code to access outlook and manipulate the items there. Try searching and see what you can come up with.
Sub aaa()
Dim OutSh As Worksheet, DataSh As Worksheet
Set OutSh = Sheets("Tracking")
Set DataSh = Sheets("Alerts")
With OutSh
Set rng = .Range("A1", .Cells(1, Columns.Count).End(xlToLeft))
End With
For Each ce In rng
With DataSh
Set findit = .Cells.Find(what:=ce)
If Not findit Is Nothing Then
firstadd = findit.Address
Do
OutSh.Cells(Rows.Count, ce.Column).End(xlUp).Offset(1, 0).Value = findit.Value & " " & findit.Offset(0, 1).Value
Set findit = .Cells.Find(what:=ce, after:=findit)
Loop Until findit.Address = firstadd
End If
End With
Next ce
End Sub
rylo
Bookmarks