- ©«¤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
|
¦^´_ 1# peter95
VBA µ{¦¡½X- Option Explicit
- Sub Ex()
- Dim D As Object, E As Variant, i As Integer
- Set D = CreateObject("SCRIPTING.DICTIONARY") '¦r¨åª«¥ó
- With ActiveSheet.Range("A1:G53")
- For Each E In .Cells
- If D.EXISTS(E.Interior.ColorIndex) Then
- Set D(E.Interior.ColorIndex) = Union(D(E.Interior.ColorIndex), E)
- Else
- Set D(E.Interior.ColorIndex) = E
- End If
- Next
- i = 1
- For Each E In D.keys
- With .Cells(i, .Columns.Count + 1).Resize(, 2)
- .Interior.ColorIndex = E
- .Value = Array("¦@p " & Application.Sum(D(E)), "¥X²{ " & D(E).Count & "¦¸")
- End With
- i = i + 1
- Next
- End With
- End Sub
½Æ»s¥N½X |
|