- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 1# adam2010
¸Õ¸Õ¬Ý¡G- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim ¦b»s¶q, »Ý¨D¶q As Long
- Dim r1, c1 As Integer
-
- '¦pªG ¦b»s¶q(ÄæB) ©Î »Ý¨D¶q(ÄæG¥H«á) ¦³²§°Ê, «h
- If Target.Column = 2 Or Target.Column > 6 Then
- r1 = Target.Row '¸ê®Æ²§°Ê©Ò¦b¦C
- ¦b»s¶q = Cells(r1, 2)
- »Ý¨D¶q = 0
- c1 = 6
- Do
- c1 = c1 + 1
- »Ý¨D¶q = »Ý¨D¶q + Cells(r1, c1)
- Loop Until »Ý¨D¶q > ¦b»s¶q
- Cells(r1, 5) = Cells(1, c1) '«Ý§ë¤é´Á
- Cells(r1, 6) = »Ý¨D¶q - ¦b»s¶q '«Ý§ë¼Æ¶q
- End If
- End Sub
½Æ»s¥N½X ps:
1. ¬°¦ó D2 ¤£¬O =C2-B2, ¦Ó¬O =B2+C2?(µ§»~?)
2. Á`¶q¤½¦¡(CD2)»P C2¤½¦¡¤@¼Ë, ¥i§R, («O¯dC2¤½¦¡§Y¥i, §ó¦³¼u©Ê)
|
|