|
Sub tt()
Dim ends%, d, i%
Set d = CreateObject("scripting.dictionary")
With Sheet1
ends = .Range("d1").End(xlDown).Row
For i = 2 To ends
If .Cells(i, "o").Comment Is Nothing Then
d(.Cells(i, 4).Value) = ""
Else
d(.Cells(i, 4).Value) = .Cells(i, "o").Comment.Text
End If
Next
End With
i = 2
Do
i = i + 1
Cells(i, "M").Value = d(Cells(i, 1).Value)
Loop Until Range("a" & i) = ""
End Sub |
|