- ©«¤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
|
¥»©«³Ì«á¥Ñ appr ©ó 2012-3-12 13:18 ½s¿è
·Q½Ð°Ý¤@¤U!!²{¦b¦pªG§Ú¦³¨â¥x¹q¸£ªº±¡ªp¤U!!! A ¸òB ªº¹q¸£ ªº®æ¦¡ ¤½¦¡ ¬Ò¬° ¤@¼Ë ®t¦b©óA¥x¹q¸£»P B¥x¹q¸£ ªº¶ZÂ÷ «Ü»· ¦ý ¬Ò¦³ºô¸ô
¦pªGA¥x¹q¸£ªº¸ê®Æ¤w¸g°µ§ó·s¡A¨º B¥x¹q¸£n¦p¦óÅý¥L»PA¥x¹q¸£ª½±µ³s½u ¨Ã ¶i¦æ§ó·s?
¬On¥ÎDDEªº¤è¦¡¶Ü?
³o¬O§Ú¥Ø«eªºVBA- 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.Offset(0, Month(Now) + 4) = RngCA.Offset(0, Month(Now) + 4) + 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
- End Sub
½Æ»s¥N½X |
|