- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 1# av8d
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, xD, Brr(1 To 1000, 1 To 2), i&, n%, sh%
Set xD = CreateObject("Scripting.Dictionary")
For sh = 2 To Sheets.Count
With Sheets(sh)
Arr = .[a1].CurrentRegion
For i = 2 To UBound(Arr)
If xD.Exists(Arr(i, 1)) Then
If Not xD.Exists(Arr(i, 1) & "|" & Sheets(sh).Name) Then
n = n + 1: Brr(n, 1) = Arr(i, 1)
Brr(n, 2) = Sheets(sh).Name
End If
xD(Arr(i, 1) & "|" & Sheets(sh).Name) = ""
Else
xD(Arr(i, 1)) = ""
End If
Next
End With
xD.RemoveAll
Next
If n > 0 Then
With Sheets("Á`ªí")
.[a1].CurrentRegion.Offset(1) = ""
.Range("a2").Resize(n, 2) = Brr
End With
End If
End Sub |
|