Hello friends,
I would like to help, this function does not allow me to enter into other functions, including built-in functions of Excel, should probably supplement the existing code.
The function makes a comparison between two tables,
Thank you !
I would like to help, this function does not allow me to enter into other functions, including built-in functions of Excel, should probably supplement the existing code.
Code:
Function Pair(r As Range, s As Range) As Integer
Dim c As Range
Dim d() As Variant
ReDim d(1 To s.Cells.Count)
For i = 1 To s.Cells.Count
d(i) = s.Cells(i).Value
Next i
For Each c In r
If c <> "" Then
For i = 1 To s.Cells.Count
If c = d(i) Then
Pair = Pair + 1
d(i) = ""
GoTo NextC
End If
Next i
End If
NextC:
Next c
End Function
Thank you !
Last edited by a moderator: