I have a macro that compares data in Sheet1 Column B with Sheet2 Column C. If they match, the value in Sheet1 Column E is copied to Sheet2 Column D. Right now the macro only lists the first match and ignores any other matches after that. How do I modify the macro to include all matches in one long string (separated by spaces)?
[code]
Sub PlaceVLookupTMS()
' place in a standard module
With Sheets("Sheet2")
.Range("D2:D" & .Range("A" & .Rows.Count).End(xlUp).Row).FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-1],Sheet1!C[-2]:C[1],4,FALSE),"""")"
End With
End Sub
[code]
Bookmarks