I had the same problem earlier with another macro and now it is with a new one but i can't figure out how to make it work.
So basically the problem i'm having is each time i run the macro the formula in the previous column is deleted :
how can make the macro not delete the formula ?Sub J3v16() Dim Names, Sports, i As Long, ii As Long Sports = Sheets("Sports").ListObjects(1).Range With Sheets("Name").ListObjects(1).DataBodyRange Worksheets("Name").Range("D2:D" & Range("D2").End(xlDown).Row).ClearContents Names = .Value For i = 1 To UBound(Names) For ii = 2 To UBound(Sports) If InStr(Sports(ii, 3), Names(i, 1)) Then Names(i, 4) = IIf(Names(i, 4) = "", Sports(ii, 1), Names(i, 4) & ", " & Sports(ii, 1)) End If Next ii Next i .Value = Names End With End Sub
here is the complete file :VLOOKUP help (1) (1).xlsm
Bookmarks