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

[¤À¨É] §PÂ_¥X²{¤£¦P§å¸¹´X¦¸

[¤À¨É] §PÂ_¥X²{¤£¦P§å¸¹´X¦¸

¤j®a¦n¡I§Ú¦³°ÝÃD·Q½Ð±Ð
1.¸ê®Æ¤¤¦³®Æ¸¹¡A©Ò¥H§Ú¥i¥H§Q¥Î¤½¦¡§ì¥X¨Ó¦oªºÁ`¼Æ¶q
2.¦ý¬O¡A¨C¤@®Æ¸¹¤U³£·|²£¥X³\¦h§å¸¹(¦]¬°¬O¤£¦P¤Ñ²£¥X)
3.§Ú·Q­n§â¸ê®ÆÅܦ¨¤U¹Ï¤º®e¡A¥kÃ䪺Äæ¦ì¼Ë¤l


ÁٽФj¤jÀ°À°§Ú
·P®¦


TEST.rar (8.98 KB)
Just do it.

¦^´_ 1# jsc0518
½Ð°Ñ¦Ò
G3=SUMPRODUCT((1/COUNTIF($B$2:$B$10,$B$2:$B$10)*($A$2:$A$10=F2)))

H3=SUMIF($A$2:$A$10,F2,$C$2:$C$10)

TOP

¦^´_ 1# jsc0518

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test()
Dim Arr, xD, xD1, T1, TT, i&
Set xD = CreateObject("Scripting.Dictionary")
Set xD1 = CreateObject("Scripting.Dictionary")
Arr = Range([c1], [a65536].End(3))
For i = 2 To UBound(Arr)
    T1 = Arr(i, 1): TT = Arr(i, 1) & Arr(i, 2)
    If xD.Exists(TT) Then
        xD(TT & "") = xD(TT & "") + 1
        xD(T1 & "") = xD(TT & "")
    Else
        xD(TT & "") = 1: xD(T1 & "") = 1
    End If
    xD1(T1 & "") = xD1(T1 & "") + Arr(i, 3)
Next
Arr = Range([g2], [f65536].End(3))
For i = 1 To UBound(Arr)
    Arr(i, 1) = xD(Arr(i, 1) & "")
    Arr(i, 2) = xD1(Arr(i, 1) & "")
Next
Range("g2").Resize(UBound(Arr)) = Arr
End Sub

TOP

¦^´_ 2# aer
Dear aer,
±z¦n¡I«D±`·PÁ±zªº¼ö¤ß«ü¾É¡A¤½¦¡´ú¸Õ«áµo²{¤@­Ó°ÝÃD
·í§Ú§â¨Ó·½¸ê®Æ§R°£¤@Äæ¦C®É¡A¤½¦¡·|¦³¿ù»~¡A³o³¡¤À¬O§_¥i¥H­×§ï©O¡H
¦]§Úªº¸ê®Æ¨C¤ë³£·|²£¥X(·|·s¼W)¡A©Ò¥HÄæ¦ìµLªk©T©w¡C
ÁÂÁ±z¡I


11111.gif
Just do it.

TOP

¦^´_ 3# samwang
Dear samwang,
±z¦n¡I·PÁ±z¼ö¤ßªº«ü¾É¦^ÂÐ
°õ¦æVBA«á¡A¦bG2~G4Äõ©_¼Æ¾Ú¨Ã¥¼¦]§å¸¹¦h¹è¦Ó¦Û°Ê­pºâÅÜ°Ê
¦p¤U¹Ï


11.gif
Just do it.

TOP

¦^´_ 5# jsc0518

½Ð¦A¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test2()
Dim Arr, xD, xD1, T1, i&
Set xD = CreateObject("Scripting.Dictionary")
Set xD1 = CreateObject("Scripting.Dictionary")
Arr = Range([c1], [a65536].End(3))
For i = 2 To UBound(Arr)
    T1 = Arr(i, 1)
    xD(T1 & "") = xD(T1 & "") + 1
    xD1(T1 & "") = xD1(T1 & "") + Arr(i, 3)
Next
Arr = Range([g2], [f65536].End(3))
For i = 1 To UBound(Arr)
    T1 = Arr(i, 1)
    Arr(i, 1) = xD(T1 & "")
    Arr(i, 2) = xD1(T1 & "")
Next
Range("g2").Resize(UBound(Arr), 2) = Arr
End Sub

TOP

¥»©«³Ì«á¥Ñ aer ©ó 2021-6-17 15:59 ½s¿è

TEST-°ÊºA°}¦C1.rar (12.53 KB) ¦^´_ 4# jsc0518
§ï°ÊºA°}¦C¸Õ¸Õ


TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

¦^´_ 5# jsc0518

¤£¦n·N«ä¡A¬Ý¤F¨ä¥L¤j¤j¸Ñµª¡A²×©ó¤F¸Ñ±zªº»Ý¨D¤F¡A6¼Óµ{¦¡½Ð©¿²¤¡A¤U­±µ{¦¡½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ¡C

Sub test3()
Dim Arr, xD, xD1, T1, TT, i&
Set xD = CreateObject("Scripting.Dictionary")
Set xD1 = CreateObject("Scripting.Dictionary")
Arr = Range([c1], [a65536].End(3))
For i = 2 To UBound(Arr)
     T1 = Arr(i, 1): TT = Arr(i, 1) & Arr(i, 2)
     If Not xD.Exists(TT) Then
         xD(TT & "") = xD(TT & "") + 1
         xD(T1 & "") = xD(T1 & "") + xD(TT & "")
     End If
     xD1(T1 & "") = xD1(T1 & "") + Arr(i, 3)
Next
Arr = Range([g2], [f65536].End(3))
For i = 1 To UBound(Arr)
    T1 = Arr(i, 1)
    Arr(i, 1) = xD(T1 & "")
    Arr(i, 2) = xD1(T1 & "")
Next
Range("g2").Resize(UBound(Arr), 2) = Arr
End Sub

TOP

¦^´_ 7# aer

Hi ±z¦n¡I·PÁ±zªº¼ö¤ßÀ°¦£¡A
­è­èRUN¤F¤@¤U»yªk¡Aµ²ªG¬O§Ú­nªº¡A¦ý»Ý­n¶]¤@¨Ç®É¶¡(³s¦sÀɮ׳£­n¤@ÂI®É¶¡)¡A§Úªº¸ê®Æ¥Ø«e¬ù¦³2381µ§
Just do it.

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD