ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ±NÀx¦s®æªº¶À©³¤Wªº¼Æ¦r¥[Á`

¦^´_ 1# peter95
VBA µ{¦¡½X
  1. Option Explicit
  2. Sub Ex()
  3.     Dim D As Object, E As Variant, i As Integer
  4.     Set D = CreateObject("SCRIPTING.DICTIONARY")  '¦r¨åª«¥ó
  5.     With ActiveSheet.Range("A1:G53")
  6.         For Each E In .Cells
  7.             If D.EXISTS(E.Interior.ColorIndex) Then
  8.                     Set D(E.Interior.ColorIndex) = Union(D(E.Interior.ColorIndex), E)
  9.             Else
  10.                Set D(E.Interior.ColorIndex) = E
  11.             End If
  12.         Next
  13.         i = 1
  14.         For Each E In D.keys
  15.             With .Cells(i, .Columns.Count + 1).Resize(, 2)
  16.                 .Interior.ColorIndex = E
  17.                 .Value = Array("¦@­p " & Application.Sum(D(E)), "¥X²{ " & D(E).Count & "¦¸")
  18.             End With
  19.             i = i + 1
  20.         Next
  21.     End With
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD