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

[µo°Ý] ½Ð°Ý¡G¥X²{ °õ¦æ¶¥¬q¿ù»~"11" °£¥H¹s ¦p¦ó³B²z

[µo°Ý] ½Ð°Ý¡G¥X²{ °õ¦æ¶¥¬q¿ù»~"11" °£¥H¹s ¦p¦ó³B²z

°õ¦æ¥H¤Uµ{¦¡·|¥X²{  ¡i°õ¦æ¶¥¬q¿ù»~"11"  °£¥H¹s¡j°T®§µøµ¡
m = Application.Max(0, Round((.Range("f1") - (B + B.Offset(, 1))) / B.Offset(, 1), 0))
¤W­±µ{¦¡½X¬°¿ù»~´y­z~~½Ð°Ý­n¦p¦ó­×¥¿°Ç

°õ¦æÀɮפº®e¦p¹ÏÀÉ


Private Sub CommandButton1_Click()
With Sheet1

Set Rng = .Range(.[D5], .[D65536].End(xlUp))

       For Each B In Rng

         If IsDate(B) And (B + B.Offset(, 1) < .Range("f1")) Then

         m = Application.Max(0, Round((.Range("f1") - (B + B.Offset(, 1))) / B.Offset(, 1), 0))

         B.Offset(, 3) = B + B.Offset(, 1) + m * B.Offset(, 1)

         ElseIf IsDate(B) And (B + B.Offset(, 1) > .Range("f1")) Then

         B.Offset(, 3) = B + B.Offset(, 1)

         End If

       Next

End With
End Sub

°ÝÃD.JPG (41.86 KB)

°ÝÃD.JPG

¦^´_ 1# lone_tiger0303

§PÂ_¦¡¤¤¥[¤J§PÂ_¤À¥À¬O§_¬°0
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦A½Ð±Ð¤@¤U¡A¥H¤Uµ{¦¡
m = Application.Max(0, Round((.Range("f1") - (B + B.Offset(, 1))) / B.Offset(, 1), 0))
¤¤ªºroundªí¬O¥|±Ë¤­¤J
§Ú§Æ±æ¯à¥HµL±ø¥ó¶i¤J
¤£ª¾­n¥Î­þ¤@­Ó¨ç¼Æ(roundup¦n¹³¤£¯à¥Î)
ÁÂÁÂ

TOP

¦^´_ 3# lone_tiger0303


    ¸Õ¸Õ
m = Application.Max(0, Application.RoundUp((.Range("f1") - (B + B.Offset(, 1))) / B.Offset(, 1), 0))
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD