- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
¥»©«³Ì«á¥Ñ PJChen ©ó 2020-7-7 19:36 ½s¿è
¦^´_ 42# ã´£³¡ªL
ã¤j¦n,
§Ú¥Î42¼Óªºµ{¦¡,קï«á¥Î¨Ó§ì¨ú«È¤á¤U³æªº"qÁʼÆ",קï«áªºµ{¦¡¦p¤U¡G- Sub ²z³fqÁʶq()
- Dim Rw&, xR As Range, xH As Range, c%, Fx$
- Rw = Cells(Rows.Count, "K").End(xlUp).Row
- If Rw <= 2 Then Exit Sub
- '´ú¸Õ¨ä¤¤¤@ӫȤ᪺¤U³æ¼Æ...¥þ³£
- [q2] = "=SUMIFS(ºô³æ.¥þ³£!$I:$I,ºô³æ.¥þ³£!$C:$C,BF²z³f!$D2," & _
- "ºô³æ.¥þ³£!$K:$K,BF²z³f!$C2)+IF(BF²z³f!$R$283=BF²z³f!$B$283,BF²z³f!$R2,0)"
- For Each xR In Range("K2:K" & Rw)
- If xR = "«~¦W" Then Set xH = xR(2, 7): c = 1: GoTo 101
- If xR = "¦Xp" Then
- If c = 0 Then GoTo 101
- With Range(xH, xR(0, 7)) 'QÄæ¶ñ¤J¤½¦¡
- .FormulaR1C1 = [q2].FormulaR1C1
- .Value = .Value
- .Replace 0, "", 1 '*****(1,§¹¥þ²Å¦X)
- End With
- c = 0
- End If
- 101: Next
- [q2] = "qÁʼÆ"
- End Sub
½Æ»s¥N½X °ÝÃD¦p¤U¡G
²z³f³æ_qÁʼÆ.rar (81.02 KB)
a) QÄ檺qÁʼÆ,¬O«È¤á¤U³æªº¼Æ¶q,¦¬¨ìq³æªº®É¶¡³£¤£¬O¦P®Éªº
b) «È¤áq³æ¦WºÙ°Ï¤À¦bAÄæ,«È¤áªºq³æ®æ¦¡³£¤£¬Û¦P,©Ò¥H6ӫȤᦳ6Ó¤½¦¡§ì¨ú¸ê®Æ
c) §Úקï¤F¤§«eªº¤@Óµ{¦¡,¥Î¨Ó§ì¨úQÄ檺qÁʼÆ,¦ýµ{¦¡¤£¬O±M¬°³oÓ¦Ó³]p,©Ò¥H¤U¤@ӫȤ᪺q³æ,·|§â«e¤@q³æ¼Æµ¹Âл\
d) RÄ檺¥[´î¼Æ¶q,¬O¦]À³«È¤á¦³q³æ"¥[¶q" or "´î¶q"ªº»Ý¨D¦Ó³],¦³®É«È¤H·|¦b¤U³æ´X¤Ñ«e´N§iª¾,¦ý¤£·|קï·í¤éq³æ,©Ò¥H»Ýn¥Î¨ìRÄ檺"¥[´î¼Æ¶q",
¥i¥H¹w¥ýkey¤J,¦ý®É¶¡¥¼¨ì®É«h¤£¤©p¤J¡I
e) ½Ð°Ýn¦p¦óקïµ{¦¡,¥i¥H±NAÄæ¦WºÙ(«È¤á)¦C¤Jµ{¦¡¤¤,Åý¤£¦P®É¶¡¤U³æªº6ӫȤá,¦U¦Ûªºq³æ¼Æ¤£·|³QÂл\?
''----------AÄæ¦WºÙ1) ¥þ³£
[q2] = "=SUMIFS(ºô³æ.¥þ³£!$I:$I,ºô³æ.¥þ³£!$C:$C,BF²z³f!$D2," & _
"ºô³æ.¥þ³£!$K:$K,BF²z³f!$C2)+IF(BF²z³f!$R$283=BF²z³f!$B$283,BF²z³f!$R2,0)"
''----------AÄæ¦WºÙ2) ²Î²Î
[q2] = "=SUMIFS(ºô³æ.²Î²Î!$R:$R,ºô³æ.²Î²Î!$M:$M,BF²z³f!$D2,ºô³æ.²Î²Î!$AC:$AC,BF²z³f!$C2," & _
"ºô³æ.²Î²Î!$AE:$AE,BF²z³f!$B$1)+IF(BF²z³f!$R$1=BF²z³f!$B$1,BF²z³f!$R2,0)"
''----------AÄæ¦WºÙ3) ¼wQQK
' [q2] = "=SUMIF(ºô³æ.¼wQQK!$E:$E,BF²z³f!$D2,ºô³æ.¼wQQK!$G:$G)+IF(BF²z³f!$R$388=BF²z³f!$B$388,BF²z³f!$R2,0)"
'''----------AÄæ¦WºÙ4) MªÀ
' [q2] = "=SUMPRODUCT((ºô³æ.MªÀ!$R$2:$R$300=BF²z³f!$D2)*(ºô³æ.MªÀ!$AP$2:$AP$300))+IF(BF²z³f!$R$561=BF²z³f!$B$561,BF²z³f!$R2,0)"
'''----------AÄæ¦WºÙ5) ±o¨Ó
' [q2] = "=SUMIFS(ºô³æ.±o¨Ó!$L:$L,ºô³æ.±o¨Ó!$H:$H,BF²z³f!$D2,ºô³æ.±o¨Ó!$O:$O,BF²z³f!$C2)+IF(BF²z³f!$R$420=BF²z³f!$B$420,BF²z³f!$R2,0)"
'''----------AÄæ¦WºÙ6) W±d
' [q2] = "=SUMPRODUCT((ºô³æ.W±d!$C$6:$C$298=BF²z³f!$D2)*(ºô³æ.W±d!$D$6:$D$298))+IF(BF²z³f!$R$508=BF²z³f!$B$508,BF²z³f!$R2,0)" |
|