做,肯定能做出,有点烦, 我的思路,先在每列得到不重复数,先排列出所有的可能,然后,,, 如: Set dic = CreateObject("Scripting.Dictionary") n = Cells(65536, 1).End(xlUp).Row cel = [b2].Resize(n, 1) For i = 1 To UBound(cel) dic(cel(i, 1)) = "" Next arr = dic.keys dic.RemoveAll cel = [c2].Resize(n, 1) For i = 1 To UBound(cel) dic(Replace(cel(i, 1), " ", "")) = "" Next brr = dic.keys dic.RemoveAll cel = [a2].Resize(n, 1) For i = 1 To UBound(cel) dic(cel(i, 1)) = "" Next crr = dic.keys dic.RemoveAll For i = 0 To UBound(arr) - 1 For j = 0 To UBound(brr) - 1 For k = 0 To UBound(crr) - 1 dic.Add arr(i) & "," & brr(j) & "," & crr(k), 0 Next k, j, i cel = [a2].Resize(n - 1, 3) For p = 1 To n - 1 s = cel(p, 2) & "," & Replace(cel(p, 3), " ", "") & "," & cel(p, 1) If dic.exists(s) Then dic.Item(s) = dic.Item(s) + 1 Next ... |