”excel vba 有4个数2,2,4,5 用循环相互对比,得出这4个数中有3个互不相同的数的个数是3

来源:学生作业帮助网 编辑:作业帮 时间:2024/08/07 22:19:08
”excel vba 有4个数2,2,4,5 用循环相互对比,得出这4个数中有3个互不相同的数的个数是3
xQJ@,$B[wPK.dl#2 .";RиHN n;{;?bGplRf$gWUMȧOrG},.-zN'۵:$q,;ABD5Yƿ Mَ%S1JB4#m1 F:CfIp<~׋-;6@9,p|kԴm:!JeTŮv 8*V`j= ǰȪb! ʲĚ S {7VY4@

”excel vba 有4个数2,2,4,5 用循环相互对比,得出这4个数中有3个互不相同的数的个数是3
”excel vba 有4个数2,2,4,5 用循环相互对比,得出这4个数中有3个互不相同的数的个数是3

”excel vba 有4个数2,2,4,5 用循环相互对比,得出这4个数中有3个互不相同的数的个数是3
Sub createdictionary()
arr = Array(2,2,4,5)
Set dic = CreateObject("scripting.dictionary")
For Each a In arr
If Not dic.exists(a) Then dic.Add a,""
Next
MsgBox "这一组数据中不重复的数据个数为" & dic.Count & "个"
End Sub