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

[µo°Ý] «¬ºA¤£²Å¦X¨D§U

[µo°Ý] «¬ºA¤£²Å¦X¨D§U

  1. Sub ts()
  2. Dim arr, brr
  3. Dim i As Long, m As Long
  4. Dim dic As Object

  5. Set dic = CreateObject("scripting.dictionary")
  6. arr = Range("a1:a" & Cells(Rows.Count, 1).End(xlUp).Row)
  7. For i = 1 To UBound(arr)
  8.     If Not dic.exists(arr(i, 1)) Then
  9.         dic.Add arr(i, 1), ""
  10.     Else
  11.         dic.Item(arr(i, 1)) = dic.Item(arr(i, 1)) + 1
  12.     End If
  13. Next i
  14. [c1].Resize(dic.Count) = Application.Transpose(dic.keys)
  15. [d1].Resize(dic.Count) = Application.Transpose(dic.items)
  16. Set dic = Nothing
  17. End Sub
½Æ»s¥N½X
°õ¦æ®É¡Adic.Item(arr(i, 1)) = dic.Item(arr(i, 1)) + 1
¥X²{¿ù»~13¡A«¬ºA¤£²Å¦X°ÝÃD
¥i¥H½Ð±Ð¸ô¹L¬Ý¨ìªº¤j¤j¡A½Ð°Ý°ÝÃD¬O¦b¨º¸Ì©O

¦^´_ 1# idnoidno
°j°é¤º§PÂ_¦¡§ï¬°¦p¤U¸Õ¸Õ¬Ý¡G
If Not dic.exists(arr(i, 1)) Then
    dic(arr(i, 1)) = 1
Else
    dic(arr(i, 1)) = dic(arr(i, 1)) + 1
End If

TOP

ÁÂÁ±zªº¦^ÂÐ

TOP

        ÀR«ä¦Û¦b : ­×¦æ­nô½t­×¤ß¡AÂǨƽm¤ß¡AÀH³B¾i¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD