- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 3# ivan731129
03ª©- Sub Ex()
- Dim D(1 To 2) As Object, R, SH As Worksheet, T As String, I As Integer, AR(), A
- Dim ShCount As Integer
- Set D(1) = CreateObject("SCRIPTING.DICTIONARY")
- Set D(2) = CreateObject("SCRIPTING.DICTIONARY")
- With Sheets("¶°¦XÀÉ")
- .Cells.Clear
- For Each SH In Sheets
- If SH.Name = "¶°¦XÀÉ" Then Exit For
- ShCount = ShCount + 1
- For Each R In SH.Range("A1").CurrentRegion.Rows
- T = R.Cells(1) & "," & Join(Application.Transpose(Application.Transpose(R.Cells(1, 1).Resize(1, 8))), ",")
- If D(1).Exists((T)) = False Then
- D(1)(T) = Array(False, 1)
- D(2)(T) = Array(Join(Application.Transpose(Application.Transpose(R)), ","))
- Else
- D(1)(T) = Array(True, D(1)(T)(1) + 1)
- If R.Row <> 1 Then
- AR = D(2)(T)
- ReDim Preserve AR(UBound(AR) + 1)
- AR(UBound(AR)) = Join(Application.Transpose(Application.Transpose(R)), ",")
- D(2)(T) = AR
- End If
- End If
- Next
- Next
- For Each R In D(1).KEYS
- If D(1)(R)(0) = True And D(1)(R)(1) = ShCount Then 'D(1)(R)(1) = ShCount ¨CÓ¸ê®Æ®w³£¥X²{
- For Each A In D(2)(R)
- I = I + 1
- .Cells(I, 1).Resize(1, UBound(Split(A, ",")) + 1) = Split(A, ",")
- Next
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|