阅: 1925 | 回: 0
等级:初学者
- 积分:0
- 财富值:0.0
- 身份:普通用户
当A1=267809135,B1=267813549时,那么C1=04
插入如下模块:
Function 不重复(rg As Range)
Dim dic As Object
Dim rng As Range
Dim str As String
Dim i As Long
Dim L As Long
Dim temp
Set dic = CreateObject("Scripting.Dictionary")
For Each rng In rg
str = rng.Value
L = Len(str)
For i = 1 To L
str1 = Mid(str, i, 1)
If dic.exists(str1) Then
dic(str1) = dic(str1) + 1
Else
dic.Add str1, 1
End If
Next
Next
temp = dic.items
temp1 = dic.keys
For i = 0 To UBound(temp)
If temp(i) = 1 Then
不重复 = 不重复 & temp1(i)
End If
Next
End Function
然后:c1=不重复(a1:b1)即可!
补:重复数字个数公式:{=SUM(ISNUMBER(FIND(ROW(1:10)-1,A1))*ISNUMBER(FIND(ROW(1:10)-1,B1)))}
我的个性签名