- ©«¤l
- 20
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 63
- ÂI¦W
- 0
- §@·~¨t²Î
- WINXP
- ³nÅ骩¥»
- OFFICE 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-11-21
- ³Ì«áµn¿ý
- 2023-2-9
|
·PÁ¦U¦ì«e½ú«ü¾É,¦b¬Ý¦U¦ìªº«ü¾É¤§«e,§Ú¸ÕµÛ¼¶¼g¦p¤U,¦]¬°§Úè¦Û¾ÇVBA¥b¦~,¦³¿ù»~¤§³B,¦A½Ð¤j®a±Ð¾É¤@¤U~~·PÁÂ~
Sub °»¿ù()
Dim r As Integer
For r = 1 To Application.WorksheetFunction.CountA(Sheets("Sheet1").Range("E:E"))-1
If Sheets("Sheet1").Cells(r + 7, 5) < Worksheets("°»¿ù³W®æ³]©w").Range("B2").Value Or Sheets("Sheet1").Cells(r + 7, 5) > Worksheets("°»¿ù³W®æ³]©w").Range("B1").Value Then
Sheets("Sheet1").Cells(r + 7, 5) = Round(Rnd() * Worksheets("°»¿ù³W®æ³]©w").Range("B5").Value, 3) + Worksheets("°»¿ù³W®æ³]©w").Range("B4").Value
End If
Next
End Sub
(ª`·N¨Æ¶µ)
1.¥ý½T»{EÄ椺¦@¿é¤J´Xµ§¸ê®Æ(µo²{¦X¨ÖÀx¦s®æ¤º¤§¼ÐÃD³Qºâ¬°1µ§¸ê®Æ)
2.¦]Sheet1¦³¼ÐÃD¦C,¬Gr+7¦C¬°¯u¥¿¼Æ¦r¸ê®Æ¿é¤J°_©l¦C
3."°»¿ù³W®æ³]©w"¤u§@ªí¤º¤§B1/B2¤À§O¬°³W®æ¤W¤U; B4¬°¶Ã¼Æ¤U,B5¬°¦Û¶Ã¼Æ¤U©¹¤W¼Æ°_,¦@n¦ÛB5³]©wȤ§²Õ¼Æ¤º¬D¤@Ӷüƪº²Õ¼Æ¨Ì¾Ú
4.·íªì³]©w¶Ã¼Æ²£¥Í»Ý¦³¤p¼ÆÂI3¦ì,¬G¨Ï¥ÎRound¨Ó³W½d¶Ã¼Æ²£¥Í§e²{¤è¦¡ |
|