Hi, This David 
Please i need some help on GetMatch Formula and the VBA Macro..
Here is the Problem:
I have First Group of Number is In Cell C6 -> 28-17-20-32-21-18-25-40-50-60
the Second Group Of Numbers is In Cell C9 -> 18-19-20-21-22-23-24-40-50-60
i Need to Extract The Numbers that Match in the 2 Groups (20 21 18 40 50 60) and copy In Cell F6
Please i need a Correction
I Inserted the Following VBA Code :
Function GetMatch(LookFor, LookIn)
GetMatch = ""
StartPos = 1
For i = 1 To Len(LookFor)
If Mid(LookFor, i, 1) = "-" Then
ThisStr = Mid(LookFor, StartPos, (i - StartPos))
If InStr(LookIn, ThisStr) > 0 Then
GetMatch = GetMatch & ThisStr & ", "
End If
StartPos = i + 1
End If
Next i
ThisStr = Mid(LookFor, StartPos, (i - StartPos))
If InStr(LookIn, ThisStr) > 0 Then
GetMatch = GetMatch & ThisStr & ", "
End If
If Len(GetMatch) > 3 Then
GetMatch = Left(GetMatch, Len(GetMatch) - 2)
End If
End Function
And in Cell F6 (where i need the result) I Copy the following Formula :
Then when I Run the sheet i got i Error message :
Please i need some expert to revise my mistake and tell me what is wrong....
Thanks !!!
Bookmarks