- ©«¤l
- 28
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 32
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-1-1
- ³Ì«áµn¿ý
- 2012-6-29
|
¦^´_ 17# register313
¤£¦n·N«ä¡A¤S¥X²{¦b¤F¨âÓ°ÝÃD·Q½Ð±Ð¤@¤U¡A §Ú·Qn¦P®ÉÅýA2¸òµÛC2¥H¤ÎG2°µ¤@¼Ëªº°Ê§@!!
¦ý¨C¦¸¥Î¦n«á ¡A§Úªºexcel´N·í±¼¤F!!!¬Oµ{¦¡½X§Ú¥´¿ù¤F¶Ü?
¥H¤Î¦pªG·QÅý G2¥i¥H¬O¦Û°Ê§P§O¤ë¥÷ !!! ¤]´N¬O»¡ 2¤ë¥÷¬O¦bG2 ·í 3¤ë¥÷·|¦Û°Ê¸õ¨ì H2 ³o¬On«ç»ò³]©w????- Private Sub worksheet_change(ByVal target As Range)
- Set RngA = Range("A2:A4")
- Set RngB = Range("B2:B4")
- Set RngCA = Intersect(target, RngA)
- Set RngCS = Intersect(target, RngB)
- If Not RngCA Is Nothing Then
- RngCA.Offset(0, 2) = RngCA.Offset(0, 2) + RngCA.Value
- RngCA.Value = ""
- End If
- If Not RngCS Is Nothing Then
- RngCS.Offset(0, 1) = RngCS.Offset(0, 1) - RngCS.Value
- RngCS.Value = ""
- End If
- Set RngD = Range("D2:D4")
- Set RngE = Range("E2:E4")
- Set RngDE = Intersect(target, RngD)
- Set RngED = Intersect(target, RngE)
- If Not RngDE Is Nothing Then 'E2~E4=D2~D4
- RngE.Value = RngD.Value
- End If
- If Not RngED Is Nothing Then 'D2~D4=E2~E4
- RngD.Value = RngE.Value
- End If
- Set RngA = Range("A2:A4")
- Set RngCA = Intersect(target, RngA)
- If Not RngCA Is Nothing Then
- RngCA.Offset(0, 6) = RngCA.Offset(0, 6) + RngCA.Value
- RngCA.Value = ""
- End If
- End Sub
½Æ»s¥N½X |
|