chirayu
Well-Known Member
Hi All,
I would like help modifying the below code to only pick unique values within a multiple value list.
I have researched already for other solutions such as IF(ISERROR(INDEX(SMALL(ROW(COUNTIF etc... however the unique list is generated by dragging the formulas in different cells rather than within the same cell itself automatically as with the below code
I have obtained the code from the VBA Ninja website
I would like help modifying the below code to only pick unique values within a multiple value list.
I have researched already for other solutions such as IF(ISERROR(INDEX(SMALL(ROW(COUNTIF etc... however the unique list is generated by dragging the formulas in different cells rather than within the same cell itself automatically as with the below code
I have obtained the code from the VBA Ninja website
Code:
Public Function VLOOKALL(MatchWith As String, TRange As Range, returncol As Double, fakeFALSE) As String
For i = 1 To TRange.Rows.Count
If TRange(i, 1) = MatchWith Then
If VLOOKALL <> "" Then
VLOOKALL = VLOOKALL & ","
End If
VLOOKALL = VLOOKALL & TRange(i, returncol)
End If
Next i
End Function