ªð¦^¦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 : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD