Cell B2 formula , Drag down

Formula: copy to clipboard
=CustomConcatenate(A2,";",$F$2:$F$6)



Function CustomConcatenate(lookupValue As String, delimiter As String, lookupRange As Range) As String
    Dim result As String
    Dim cell As Range
    Dim matchingValues As String
    result = ""
    For Each cell In lookupRange
        If InStr(1, lookupValue, cell.Value, vbTextCompare) > 0 Then
            matchingValues = matchingValues & cell.Value & delimiter
        End If
    Next cell
    If Len(matchingValues) > 0 Then
        matchingValues = Left(matchingValues, Len(matchingValues) - Len(delimiter))
    End If
    CustomConcatenate = matchingValues
End Function