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

[µo°Ý] SUMPRODUCT¨ç¼Æ+OR°Ý´£½Ð±Ð

[µo°Ý] SUMPRODUCT¨ç¼Æ+OR°Ý´£½Ð±Ð

¥»©«³Ì«á¥Ñ zz5151353 ©ó 2010-7-1 17:15 ½s¿è

DEAR  ALL¤j¤j -
1.¤p§Ì¼g¤@µ{¦¡¦p¤U.°õ¦æµL°ÝÃD
=SUMPRODUCT(ISNUMBER(SEARCH("CC",$F$1:$F$60000))*ISNUMBER(SEARCH("¤é¥ß",$G$1:$G$60000))*ISNUMBER(SEARCH("C2",$E$1:$E$60000)),$R$1:$R$60000)
2.¦ý­ì±ø¥ó ISNUMBER(SEARCH("¤é¥ß",$G$1:$G$60000)) ·Q¥[¤J¤@ OR  ±ø¥ó¬°¦p¤U  
   2.1 §Y  G1:G60000  °£§t¦³­ì±ø¥ó  ¤é¥ß ¦r¤¸¦¨¥ß¥~.  ·Q·s¼W±ø¥ó  = §t¦³¤é¥ß ©Î MCL  ¦r¤¸§¡¦¨¥ß.
   2.2 §ï¦p¤U  OR(ISNUMBER(SEARCH("¤é¥ß",$G$1:$G$60000)),ISNUMBER(SEARCH("MCL",$G$1:$G$60000)))
        µLªk§ì¨ú¥X²Î­p¸ê®Æ
'=SUMPRODUCT(ISNUMBER(SEARCH("CC",$F$1:$F$60000))*OR(ISNUMBER(SEARCH("¤é¥ß",$G$1:$G$60000)),ISNUMBER(SEARCH("MCL",$G$1:$G$60000)))*ISNUMBER(SEARCH("C2",$E$1:$E$60000)),$R$1:$R$60000)
3.µ{¦¡¦p¦ó­×§ï.·Ð¤£§[½ç±Ð   THANKS*10000

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-3-23 11:47 ½s¿è

¦^´_ 1# KITTYBOY
¦^´_ 8# Hsieh


    ÁÂÁ½׾Â,ÁÂÁ«e½ú
«á¾ÇÂǦ¹©«½Æ²ß ¦b¦P¤@°}¦C¸Ì¦¬¶°µ²ªG¸ê®Æ,±N§½³¡¸ê®Æ(µ²ªG¸ê®Æ)¼g¤JÀx¦s®æ,
¾Ç²ßªº¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

­ì©l¸ê®Æ:


°õ¦æµ²ªG1:


°õ¦æµ²ªG2:²£¥Í¤@­Ó·s¬¡­¶Ã¯


Option Explicit
Sub TEST()
Dim Brr, i&, Tr&, TT&, N&, Tf$, Tg$, j%
'¡ô«Å§iÅܼÆ:Brr¬O³q¥Î«¬ÅܼÆ,(i,Tr,TT,N)¬Oªø¾ã¼ÆÅܼÆ,
'(Tf,Tg)¬O¦r¦êÅܼÆ,j¬Oµu¾ã¼ÆÅܼÆ

Brr = Range([R1], Cells(Rows.Count, "E").End(xlUp))
'¡ô¥OBrr³o³q¥Î«¬ÅܼƬO ¤Gºû°}¦C,¥H[R1]¨ì EÄæ³Ì«á¦³¤º®eÀx¦s®æ­È±a¤J
For i = 2 To UBound(Brr)
'¡ô³]¶¶°j°é!i±q2¨ì Brr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹
   Tf = Trim(Brr(i, 2)): Tg = Brr(i, 3): Tr = Val(Brr(i, 14))
   '¡ô¥OTf³o¦r¦êÅܼƬO i°j°é¦C²Ä2ÄæBrr°}¦C­È¥h°£ÀY§ÀªÅ¥Õ¦r¤¸ªº·s¦r¦ê
   '¡ô¥OTg³o¦r¦êÅܼƬO i°j°é¦C²Ä3ÄæBrr°}¦C­Èªº·s¦r¦ê
   '¡ô¥OTr³oªø¾ã¼ÆÅܼƬO i°j°é¦C²Ä14ÄæBrr°}¦C­È¸gÂà¤Æ¬°¼Æ­Èªº¾ã¼Æ

   If Tf Like "CC*" Then
   '¡ô¦pªGTfÅܼƬO¥H "CC"¦r¦ê¶}ÀY?
      If Tg Like "*¤é¥ß*" Or Tg Like "*MCL*" Then
      '¡ô¦pªG TgÅܼƸ̥]§t"¤é¥ß"¦r¦ê,©Î TgÅܼƸ̥]§t"MCL"¦r¦ê?,
      '³o¨â­Ó¨ä¤¤¥u­n¦³¤@­Ó±ø¥ó¦¨¥ß?

         TT = TT + Tr: N = N + 1
         '¡ô¥OTT³oªø¾ã¼ÆÅܼƬO TTÅܼƦۨ­ + TrÅܼÆ,
         '¥ON³oªø¾ã¼ÆÅܼƲ֥[ 1  (PS:NÅܼƤ@¶}©lªºªì©l­È¬O0)

         '(NÅܼƬO­n«ü©w²Å¦X±ø¥óªº¸ê®Æ­n³°Äò©ñ¦bBrr°}¦Cªº­þ­Ó¦C¦ì)
         For j = 1 To UBound(Brr, 2): Brr(N + 1, j) = Brr(i, j): Next
         '¡ô³]¶¶°j°é!j±q1¨ì Brr°}¦C¾î¦V³Ì¤j¯Á¤ÞÄ渹,
         '¥O(NÅܼÆ+1)¦C²ÄjÅܼÆÄ檺Brr°}¦C­È¬O i°j°é¦C²ÄjÅܼÆÄ檺Brr°}¦C­È

      End If
   End If
Next
[B2] = TT
'¡ô¥O[B2]Àx¦s®æ­È¬O TTÅܼÆ
Workbooks.Add
'¡ô¥O²£¥Í¤@­Ó·sªº¬¡­¶Ã¯
[A1].Resize(N + 1, UBound(Brr, 2)) = Brr
'¡ô¥O·s¬¡­¶Ã¯²Ä1­Ó¤u§@ªíªº[A1]Àx¦s®æÂX®i¦V¤U NÅܼÆ+1¦C,
'¦V¥kÂX®i Brr°}¦C¾î¦V³Ì¤j¯Á¤ÞÄ渹¼ÆÄæ,³o½d³òÀx¦s®æ­È ¥HBrr°}¦C­È±a¤J

Cells.Columns.AutoFit
'¡ô¥O¾ã­Ó¤u§@ªí¥þ³¡Äæ¦ì ¦Û°Ê½Õ¾ãÄæ¼e
ActiveWindow.Zoom = 75
'¡ô¥Oµøµ¡Åã¥Ü75%
'100 ªí¥Ü¥¿±`¤j¤p¡B200 ªí¥ÜÂù­¿¤j¤p¡A¨Ì¦¹Ãþ±À)

MsgBox TT
'¡ô¥O¸õ¥X´£¥Üµ¡Åã¥Ü: TTÅܼƭÈ
Erase Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 10# zz5151353


    DEAR  HSIEH   PD961A  ZZ5151353  ALL  ¤j¤j -
       ·PÁ±z­Ì¤§«ü¾É.µ{¦¡TEST«á¹B§@¥¿±`   THANKS*10000

TOP

¥»©«³Ì«á¥Ñ PD961A ©ó 2010-7-4 10:01 ½s¿è

½Ð°Ý¦U¦ì¥ý¶i
¦P¼Ë¥ÎISNUMBER(SEARCH
½Ð°Ý¦bSEARCH($G$1:$G$6000,"MCL")),©M("C2",$E$1:$E$6000))
    ¬°¤°»ò¦ì¤l½d³ò­nÄA­Ë?¦³¯S§Oªº¥Î·N¶Ü?
ÁÂÁÂ...

TOP

B1

=SUMPRODUCT(ISNUMBER(SEARCH("C2",$E$1:$E$6000))*ISNUMBER(SEARCH("CC",$F$1:$F$6000))*ISNUMBER(SEARCH($G$1:$G$6000,"¤é¥ß"))+ISNUMBER(SEARCH($G$1:$G$6000,"MCL")),$R$1:$R$6000)
300 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 7# KITTYBOY


     '=SUMPRODUCT(ISNUMBER(SEARCH("CC",$F$1:$F$60000))*(OR(ISNUMBER(SEARCH($G$1:$G$60000,{"¤é¥ß","MCL"}))))*ISNUMBER(SEARCH("C2",$E$1:$E$60000)),$R$1:$R$60000)

1-1.rar (55.03 KB)

¸Õ¸Õ¬Ý...

TOP

{=SUM(IF((ISNUMBER(FIND("CC",$F$2:$F$6000)))*((ISNUMBER(FIND("¤é¥ß",$G$2:$G$6000)))+(ISNUMBER(FIND("MCL",$G$2:$G$6000)))),$R$2:$R$6000,))} 1.rar (55.33 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# KITTYBOY

DEAR  ALL¤j¤j -
1.±N±z«ü¾É¤§µ{¦¡¨Ï¥Î©ó¦pªþÀÉ®×.¨q¥X 0 ????  
    1.1 ­ì¤é¥ß¥[Á`     =RANGE("B1")    10119
          ¦ý¤é¥ß  ©Î MCL ¤§¥[Á` =RANGE("B2")    0
          À³ >= 10119 ¤~¹ï.
2.·Ð¦A¤£§[½ç±Ð.  THANKS

2.JPG (47.98 KB)

2.JPG

1.rar (56.07 KB)

TOP

DEAR  zz5151353 ¤j¤j-
²Å¦X¶·¨D.THANKS *10000

DEAR  victorl  ¤j¤j-
SUMIF µLªk²Å¦ó§Ú¦h±ø¥ó¤§»Ý¨D.THANKS.

TOP

E8

=SUMPRODUCT(ISNUMBER(SEARCH("CC",$A$1:$A$60000))*(OR(ISNUMBER(SEARCH($B$1:$B$60000,{"¤é¥ß";"MCL"}))))*ISNUMBER(SEARCH("C2",$C$1:$C$60000)),$D$1:$D$60000)
300 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD