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

[µo°Ý] VBA ·í¾l¼Æ=0¡A©³¦â¼Ð¥Ü¦ì§}²£¥ÍBUG¤§­×¥¿¡C

[µo°Ý] VBA ·í¾l¼Æ=0¡A©³¦â¼Ð¥Ü¦ì§}²£¥ÍBUG¤§­×¥¿¡C

°Ñ¦Òªþ¥ó¡J
http://www.FunP.Net/485107

R5=°ò·Ç­È¡F           R6=­pºâ³Ì²×´Á¡F  T5=­pºâ°ò·Ç´Á¼Æ¡F  T3=R6-T5
R7=T5ªº­pºâ¹ïÀ³´Á¡F  Q5=R7+T3¡F       Q6=T5-R7

»¡©ú¡J
For k = 0 To Int([T5] / [Q6])   '¦C26
·í¨ä­pºâ=Q6ªº¶¡¶Z¤§­Ó¼Æ¨ú¾ã¼Æ¦Ó¦³¾l¼Æ®É~
¨ä¦UkÂI©³¦â¼Ð¥Ü¦ì§}§¹¥þ¥¿½T¡C
EX¡JSheet1

·í¨ä­pºâ=Q6ªº¶¡¶Z¤§­Ó¼Æ¨ú¾ã¼Æ¦ÓµL¾l¼Æ®É~
¨ä³Ì«ákÂIªº©³¦â¼Ð¥Ü¨Ìµ{¦¡¬O·|¸¨¦b²Ä6¦C(¼ÐÃD¦C)¡C
EX¡JSheet2

¦]¬°¦p¥H­Ó¤Hªº´`Àô·Qªk¦Ó½×~
¶¶¦V(©¹¤U)­pºâ®É¡AR6´Á¼Æ=³Ì²×´Á
°f¦V(©¹¤W)­pºâ®É¡AR6´Á¼Æ=³Ì²×´Á=³Ìªì´Á(§Yµø¦P0´Á)~
©Ò¥H§Æ±æ³Ì«ákÂIªº©³¦â¼Ð¥Ü·|¸¨¦b=²ÄR6+6¦C¡C
EX¡JSheet3

PS¡JW3¡JZ6¬°´£¨Ñ¸ÑÃDªÌ­«·s´ú¸Õ®É~½Æ»s¶K¤WQ3¥Î(¥i¤£¥Î²z·|)

»Ý¨D
½Ð°Ý¡J
À³¸Ó¦p¦ó­×¥¿µ{¦¡»yªk?

¥H¤W  Àµ½Ð¦U¦ì«e½ú¡B¥ý¶i¤£§[½ç±Ð! ÁÂÁÂ!

¦^´_ 5# ­ã´£³¡ªL
­ã¤j:
´ú¸ÕOK¤F~¤S¾Ç¨ì¤@­Ó»yªk¡C
ÁÂÁ±zªº­@¤ß¨ó§U~·P®¦

TOP

¦^´_ 4# Airman


For k = 0 To Int([T5] / [Q6])
¡@¡@uRow = [T5] + 6 - [Q6] * k
¡@¡@If uRow <= 6 Then uRow = [R6] + 6¡@'´N±N¦¹µø¬°¡e¨Ò¥~¡f³B²z¡@
¡@¡@Cells(uRow, j).Interior.ColorIndex = 4
¡@¡@Cells(uRow, j - 8).Interior.ColorIndex = 43
Next k

TOP

§ó·s(²¤Æ)ªþ¥ó:
http://www.FunP.Net/137940

¤w±N¤£»Ý­nªºµ{¦¡½X²¾°£¡C
½Ð°Ý:
¦C14~¦C17ªºµ{¦¡½XÀ³¦p¦ó­×§ï?
¤~¯à²Å¦X»Ý¨D¡CÁÂÁÂ!

TOP

¥»©«³Ì«á¥Ñ Airman ©ó 2015-11-5 21:59 ½s¿è

¦^´_ 2# ­ã´£³¡ªL
­ã¤j:
°ÝÃDÂI´N¥u¦b±z§ó§ïªº26,27,28³o¤@¬qµ{¦¡½X
¦ý¥HFor k = [T5] To [R6] Step [Q6]
¥¦¬O20,30,40....100  §Y±qT5©¹¤U¶]¨ìR6
¤p§Ì»Ý­nªº¬O20,10,0 §Y±qT5©¹¤W¶]¨ì0¡A¦ý0­nµø¦P¬°R6~§Y©³¦â­n¼Ð¥Ü¦bR6

½Ð¸Õ·Q~¦pªG´Á¼Æ¥H´`Àô¨Ó¬Ý~
EX:R6=100
1->2->3->.....98->99->100->1->2->3->.....98->99->100-> .........

¦³·Q¥H:
IF [T5]  Mod [Q6]¾l¼Æ=0 Then ¼Ð¥Ü´Á¼Æ+R6
¨Ó¸Ñ¨M¡A¦ý¤p§Ì·Q¤F¥b¤Ñ¡A¤£ª¾¦p¦ó©M " k " ²£¥Í³sµ²?
¹ê¦b¼g¤£¥X¨Ó^^"

·q½Ð±zÄ~Äò«ü¾É~·P®¦^^

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-11-5 20:23 ½s¿è

For k = 0 To Int([T5] / [Q6])
¡÷¡@For k = 0 To Int(20 / 10)¡@¡÷¥u¶]¢¯,¢°,¢±¡A¶]¤£¤F¨ì¢°¢¯¢¯´Á¡H¡H

¬O¤£¬O³o¼Ë¡H
For k = [T5] To [R6] Step [Q6]¡@'¢±¢¯¡ã¢°¢¯¢¯¡A¥H¢°¢¯¬°¶¡¹j¡@
¡@¡@Cells(k + 6, j).Interior.ColorIndex = 4
¡@¡@Cells(k + 6, j - 8).Interior.ColorIndex = 43
Next

¨ä¥¦ªº¬Ý±o²´³£ªá¤F¡A§ï¤£¤F¡ã¡ã

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD