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

[µo°Ý] Ãö©óSUMPRODUCT¨ç¼Æ...

[µo°Ý] Ãö©óSUMPRODUCT¨ç¼Æ...

¦U¦ì«e½ú...
§Ú¦³¥÷¸ê®Æ»Ý­n°µ±ø¥ó§PÂ_,sheet4¤º¨C¦¸ªº¸ê®Æ³£¬O¸Uµ§°_¸õ

¦ý²{¦b¹J¨ìªº°ÝÃD,SUMPRODUCTªº¤½¦¡®M¥Î¦b±Nªñ4000­ÓÀx¦s®æ,
©Ò¥H¨C·í¸ê®Æ¦³©ÒÅÜ°Ê,´N·|­«·sŪ¨ú¤@¦¸®É¶¡«D±`ªº¤[...

¬O§_¦³¤èªk¯à¨Ï¥H¤Wªº§PÂ_¥u°µ¤@¦¸Åª¨ú??

©Î¬O±N =SUMPRODUCT((Sheet4!$B:$B=$C$2)*(Sheet4!$C:$C=F2))ÂàÅܬ°VBA??

ªþ¤WÀɮ׽ШD¦U¦ì«e½ú«üÂI. (ÀÉ®×¥u¦³³¡¤À®æ¦¡)

test1.zip (11.46 KB)

³¡¤À®æ¦¡

¦^´_ 11# ML089

·PÁ«ü¾É~  

¥¿±`Sheet4¸ê®Æ³q±`³£¬O¤j©ó10¸Uµ§...  ©Ò¥H¤~·|¨Ï¥ÎB:B   C:C
¦ÓSheet3·|¦³3808­Ó­pºâ.
¨Ï¥ÎSUMPRODUCT·|¶]«Ü¤[.

¥Ø«e¨Ï¥ÎªO¤j±Ð¾ÇªºVBA­×§ï«á,¤w§¹¦¨³øªí.
M¥S´£¨Ñªºªþ¥ó,¥Ø«e¤p§ÌÅv­­¤£¨¬µLªk¤U¸ü,4­Ó²³æªº¤½¦¡§Ú·|¦b¹Á¸Õ.^^

TOP

¦^´_ 3# andy8426

¥À¿Ë¸`¤Ó¦£¤F¡A«e­±«Øij2¨S¦³®É¶¡¼g¡A¥ý¼g¤@­Ó»²§UÄæ§ïµ½¤èªk
test1 SUMPRODUCT¤ÓºC.rar (17.77 KB)

4­Ó²³æ¤½¦¡¡A¦ý¤ñ­ì¤½¦¡§Ö¦h¤F¡AÁöµMCOUNTIF¨ç¼Æ«ÜºC¡A§Ú¤£¤Ó³ßÅw¨Ï¥Î¥L¡A¦ý¤j®a³£«Ü¼ôÁÙ¬O¥Î§a

Sheet3 L1 =COUNTA(Sheet4!B:B)
Sheet3 J1 =IF(C2="",J1,C2)
Sheet3 H2 =COUNTIF(OFFSET(Sheet4!E$1,,,L$1),J2&"__"&F2)
Sheet4 E1 =B1&"__"&C1
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 1# andy8426

4000¦hµ§¨Ï¥Î¤½¦¡À³¸ÓÁÙ¤£·|¤ÓºC

«Øij1¡A¤£­n¥ÎÂX¤j½d³ò
=SUMPRODUCT((Sheet4!$B:$B=$C$2)*(Sheet4!$C:$C=F2))
B:B C:C ³oºØÂX¤j½d³ò¦b2007ª©¥H¤W¬°1048576¦C¡A¼W¥[¤Ó¦hµL®Ä®æªº­pºâ«Ü®ö¶O®É¶¡
§Aªº¥Ü½d¨Ò¤~72µ§¬d¸ß¸ê®Æ¡A­pºâ¤½¦¡¤~65µ§¡A¥u­n«öF9´N·Pı¥L¶]±o®ð©I©I
±N¤½¦¡§ï¬°
=SUMPRODUCT((Sheet4!$B1:$B72=$C$2)*(Sheet4!$C1:$C72=F2))
°¨¤W´N§ïµ½«Ü¦h

«Øij2¡A¸ê®Æ®w§ó¤j®É¡A­n±Æ§Ç¾ã²zÅý¬d¸ß¥[³t
¦pSheet4 BÄæÀ³¸Ó±Æ§Ç¡A¤~¯à©w¦ì¥X¬d¸ß¤p½d³ò(°ÊºA¬d¸ß½d³ò)¡AÅý­pºâ¤ñ¹ï¤u§@¶qÁY¤p
³o³¡¤À¤ñ¸û½ÆÂø¥ý´£¥Ü¤@¤U¡Aµ¥±ß¤W¦^¨Ó¦³ªÅ¦A»¡
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 5# Hsieh


    ¥i¥H³B²z¦X¨ÖÀx¦s®æªº²Î­p
   ¾Ç²ß¤F
   ¹Á¸Õ¸ÑŪ¤£¹LÁÙ¤£ª¾¹D²Î­pªº¤è¦¡
   ¬Ý¨Ó§Ú¹ï©ó¦r¨åÁٻݭn¦h§V¤O
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 7# kimbal


  ·PÁª©¥D»¡©ú~~
¸g¹L³o¤@½Ò¾Ç¨ì«Ü¦h.

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-5-9 18:48 ½s¿è

¦^´_ 6# andy8426

> ¨º­Ós&¥Nªí¬O¬Æ»ò?
¬Ûµ¥©ó dim s as Long
>a.Offset(, -3).MergeArea(1)

§ä¥X a(FÄæ) ®æ¤l«e3Äæ (§YCÄæ)¤U¦X¨Ö®æ¤lªº¸ê®Æ
¨Ò¦p¦b®æ¤lF3®É , ´N·|§ä¥X C2 ªº¸ê®Æ (B1-1)
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 5# Hsieh

«D±`·PÁª©¥D«ü¾É~   

¥t¥~·Q°Ý¤@¤U...
Dim a As Range, s&
¨º­Ós&¥Nªí¬O¬Æ»ò?

a.Offset(, -3).MergeArea(1)
³o¬q¬Ý¤£À´...

TOP

¦^´_ 3# andy8426
  1. Sub ex()
  2. Dim a As Range, s&
  3. Set dic = CreateObject("Scripting.Dictionary")
  4. With Sheets("Sheet4")
  5.   For Each a In .Range(.[B1], .[B1].End(xlDown))
  6.      dic(a & a.Offset(, 1)) = dic(a & a.Offset(, 1)) + 1
  7.   Next
  8. End With
  9. With Sheets("Sheet3")
  10.   For Each a In .Range(.[F2], .[F2].End(xlDown))
  11.   s = dic(a.Offset(, -3).MergeArea(1) & a)
  12.      a.Offset(, 1) = s
  13.   Next
  14. End With
  15. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# andy8426

¦pªG¤@©w­n±N¸ê®Æµ²ªG¹Bºâ¨ì¨º238*16­Ócell¤¤¡A¨º¤j·§¯uªº­n¥ÎVBA¤~·|¤ñ¸û¦³®Ä²v¤F
²¦³ºª½±µ¥Îsumproductªº¸Ü¡A¨C­ÓÀx¦s®æ³£­nºâ¤@¦¸¡A©Ò¦³¸ê®Æ³£±oºâ­Ó3808¦¸
¦ý¬O¥ÎVBAªº¸Ü¡A¥i¥Hª½±µ±N©Ò¦³ªº¸ê®Æ±½¹L¤@¹M¡AµM«á¥á¨ì[238][16]ªº°}¦C¤§¤¤§Y¥i
§A¥i¥H§â§A¼gªºµ{¦¡PO¦bµ{¦¡°Ï¡A¦A½Ð¤j®aµ¹·N¨£

(¸Ü»¡§ÚÁÙ¨S¦³ªÅ¾ÇVBA¡A¥H¤W¯Âºé´Nµ{¦¡³]­pªº·§©Àµo¨¥)

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD