【VBA】多条件去重

Function kaidan(txt)
Dim i As Integer
Dim arr
Set d = CreateObject("scripting.dictionary")
For i = 1 To Worksheets("汇-销").Range("a65536").End(xlUp).Row
arr = Worksheets("汇-销").Range("a1:s" & i).Value
If arr(i, 19) = txt And arr(i, 9) > 0 Then
d(arr(i, 8)) = ""
End If
Next
kaidan = d.Count
End Function

原文地址:https://www.cnblogs.com/susuye/p/7492295.html