¦r¨å¨Ì±ø¥ópºâ¦U¤ëª÷ÃB»P¼Æ¶q
- ©«¤l
- 121
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 170
- ÂI¦W
- 62
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2021-1-21
- ³Ì«áµn¿ý
- 2024-8-20
|
¦^´_ 3# hcm19522
hcm¤j¯uªº¬O§â¨ç¼Æµo´§ªº²OºvºÉP....ÁÂÁ¤F!
¦ý§Ú¤ñ¸û°¾¦V¥ÎVB³B²z¡C |
|
|
|
|
|
|
- ©«¤l
- 1387
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 1397
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-11
- ³Ì«áµn¿ý
- 2024-11-25
|
B8:G10=COUNTIFS(¸ê®Æ!$A:$A,²Îp!B$7,¸ê®Æ!$D:$D,"<="&CHOOSE(ROW(A1),5000,10000,10^9))-SUM(B$7:B7)+B$7 |
|
google"EXCEL°g" blog ©Îgoogleºô§}:https://hcm19522.blogspot.com/
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-6-7 10:07 ½s¿è
¦^´_ 1# shuo1125
ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨ÒÀÉ
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
¸ê®Æªí:
²Îpªí°õ¦æ«e:
°õ¦æµ²ªG:
³o¬O¤£¦Û°Ê(ÂX¼W©ÎÁY´î)¦~¤ÀÄæ¦ìªº¤è®×(¥Î¤½¦¡À³¸Ó¤]¯à³B²z)
Option Explicit
Sub TEST()
Dim Brr, V&, Y, Z, i&, j%, T$, xR As Range
Set Y = CreateObject("Scripting.Dictionary")
Brr = Range([¸ê®Æ!D2], [¸ê®Æ!A65536].End(3))
For i = 1 To UBound(Brr)
T = Brr(i, 1): V = Brr(i, 4)
Z = Switch(V <= 5000, "5000¥H¤U", (V > 5000) * (V <= 10000), "5001~10000", V > 10000, "10000¥H¤W")
Y(T & "|" & Z) = Y(T & "|" & Z) + V: Y(T & "|" & Z & "|Qty") = Y(T & "|" & Z & "|Qty") + 1
Next
'=========================================
[²Îp!B2:G4,²Îp!B8:G10].ClearContents
Set xR = [²Îp!A1:G4]: Brr = xR
For i = 2 To UBound(Brr)
For j = 2 To UBound(Brr, 2): Brr(i, j) = Y(Brr(1, j) & "|" & Brr(i, 1)): Next
Next
xR = Brr
'=========================================
Set xR = [²Îp!A7:G10]: Brr = xR
For i = 2 To UBound(Brr)
For j = 2 To UBound(Brr, 2): Brr(i, j) = Y(Brr(1, j) & "|" & Brr(i, 1) & "|Qty"): Next
Next
xR = Brr
Set Y = Nothing: Set xR = Nothing: Erase Brr
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|