我有两个姓名列表,第一个列表的姓名略少于 140k(A 列),第二个列表的姓名略少于 7k(B 列)。
我想看看 A 列和 B 列是否有匹配项。
我的 Excel 技能最多只能算是基础水平。有什么办法可以做到这一点吗?
答案1
答案2
尝试以下操作UDF():
Public Function AnyMatches(r1 As Range, r2 As Range) As String
Dim v1 As String, v2 As String, r As Range, rr As Range
AnyMatches = "No"
For Each r In r1
v = r.Value
For Each rr In r2
If v = rr.Value Then
AnyMatches = "Yes"
Exit Function
End If
Next rr
Next r
End Function
这UDF()返回是的因为达斯维达出现在两个列表中。