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

[µo°Ý] VBA¤¤ªº¨ç¼Æ¦¡ ¨ú¥N

¥»©«³Ì«á¥Ñ PJChen ©ó 2020-3-2 17:41 ½s¿è

¦^´_ 4# jcchiang
§Ú¤GºØ³£­n¥Î,¥H¥Ø«e­qÁʼƤ½¦¡¨Ó»¡,±qC5:J5 / C14:J4
VBA¤¤ªº¨ç¼Æ¦¡ ¨ú¥N.rar (103.59 KB) ¬O¿ùªº,¥¦¤£Åý§Ú§R°£,½Ð¤Å¤U¸ü
³Ì·s®w¦s-¬d±b.rar (83.12 KB)

VBA¤¤ªº¨ç¼Æ¦¡ ¨ú¥N.rar (103.59 KB)

TOP

¦^´_ 3# PJChen

xc = "=SUMPRODUCT((­¸¤ñ!$F$4:$F$70=¬d±b!$B$3)*(­¸¤ñ!$AP$3:$BH$3=¬d±b!C4)*(¤ñµá¦h!$AP$4:$BH$70))" '¬d±b_­qÁʼÆ
Range("C5").Resize(1, xcol).Value = xc
¦pªGxcol=5·|¥ÑC5¦ÜG5©ñ¤J¤½¦¡C4,D4,E4,F4,G4
Range("C5").Resize( xcol,1).Value = xc
¦pªGxcol=5·|¥ÑC5¦ÜC9©ñ¤J¤½¦¡C4,C5,C6,C7,C8

¤£ª¾©p¬O­n­þ¤@ºØ

TOP

¦^´_ 2# jcchiang

§ï³o¼Ë ¦bC5Àx¦s®æ ¸ê®Æ¥¿½T,¦ý¨ä¥LÀx¦s®æ±o¥Xªº­È·|¿ù»~,­ì¦]¬°¦b©ó¬õ¦r³¡¥÷,C4¤£¬O$C$4 À³¯àÀHµÛÀx¦s®æ¤£¦P¦Ó¦ì²¾,¥i¬O±N¤½¦¡¥Îxc¨ú¥N®É,«oÅܱo¤£·|²¾°Ê,¥u¬O¤@­Ó¦ºªºªF¦è,½Ð°Ý¯à¦³¨ä¥L¼gªk,¥i¥HÅý¤½¦¡¬¡¥Î¶Ü?
SUMPRODUCT((­¸¤ñ!$F$4:$F$70=¬d±b!$B$3)*(­¸¤ñ!$AP$3:$BH$3=¬d±b!C4)*(¤ñµá¦h!$AP$4:$BH$70))

TOP

¦^´_ 1# PJChen

§ï³o¼Ë¸Õ¸Õ
xc = "=SUMPRODUCT((­¸¤ñ!$F$4:$F$70=¬d±b!$B$3)*(­¸¤ñ!$AP$3:$BH$3=¬d±b!C4)*(¤ñµá¦h!$AP$4:$BH$70))" '¬d±b_­qÁʼÆ
                        .Range("C5").Resize(1, xcol).Value = xc

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD