自定义distinct 函数

function f_distinct(y)            
    
        
dim S,D,x
        x
=split(y,",")
        
Set D = CreateObject("Scripting.Dictionary")
        
for each xxx in x
            
if not d.Exists(xxx) then D.Add xxx,xxx
        
next    
        
for each key in D.Keys
            S
=& key & ","
        next
        
if instr(S,",")>0 then
            S
=left(S,len(s)-1)
        
end if
        
set D=nothing    
        f_distinct
=trim(S)
end function 
自定义distinct 函数,修改自大笨狼的函数,这个函数很方便.
原文地址:https://www.cnblogs.com/moonvan/p/236128.html