ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð°Ýª©¤W¹ïchange¨Æ¥ó«Ü¼ôªº¤j¤j

½Ð°Ýª©¤W¹ïchange¨Æ¥ó«Ü¼ôªº¤j¤j

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2013-7-12 11:11 ½s¿è

Private Sub Worksheet_Change(ByVal Target As Range)
'Application.EnableEvents = False

If Not Intersect(Target, [E1:G50000]) Is Nothing Then Exit Sub
Range("H" & Target.Row).Formula = "=RC[-1]+RC[-2]"

'Application.EnableEvents = True
End Sub

°õ¦æ¤W­zªºµ{¦¡·|¥X²{¿ù»~28 °ïÅ|ªÅ¶¡¤£¨¬

¦pªG­n±N¤W­zµ{¦¡§ï¦¨E¨ìGÄ榳Åܰʤ~ÅÜ°Ê¡A¨ä¥LÄæÅÜ°Ê«h¤£°õ¦æ­n«ç»ò§ï¡A¨D±ÐªO¤W¤j¤j

¦^´_ 1# ÂŤÑÄR¦À
HÄæ¥i¥H¹w¥ý¶ñ¦n¤½¦¡¡A¤£¶·¥t¥~¼gVBA³B²z¡C

TOP

¦^´_ 2# stillfish00


    ¤j¤j¡A´N¬O¤£¦æ©Ò¥H¤~¥ÎVBAªºµo¤è¦¡ªü

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-7-13 07:54 ½s¿è

¦^´_ 1# ÂŤÑÄR¦À
®³±¼µù¸Ñ
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     Application.EnableEvents = False
  3.     If Not Intersect(Target, [E1:G50000]) Is Nothing Then
  4.         Application.EnableEvents = True   '¦^´_:ª«¥ó¯àIJµo¨Æ¥ó
  5.         Exit Sub
  6.     End If
  7.     Range("H" & Target.Row).Formula = "=RC[-1]+RC[-2]"
  8.     Application.EnableEvents = True
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-7-12 18:23 ½s¿è

¦^´_ 3# ÂŤÑÄR¦À
¤½¦¡¤£¦æªº­ì¦]¬O?
¤â°Ê¿é¤J­È¤½¦¡¤]¤£·|¸òµÛ¹Bºâ¶Ü?
¦³¨S¦³Àˬd¹L¤½¦¡¦Û°Ê¹Bºâ¬O§_§ï¦¨¤F¤â°Ê?

§Ú¥u¬O¦n©_«ç»ò°µ¨ì§A»¡ªº³oºØª¬ªp¡A¦]¬°code¸Ì­±¤]¬O¥h§ï¤½¦¡¦Ó¤w¡C
µM«á§Aµ{¦¡ªº§PÂ_©M¤¤¤å±Ô­zªº¬Û¤Ï¤F

TOP

¦^´_ 4# GBKEE


    G¤j¡A®³±¼µù¸Ñ´N¡A¨ä¥LÀx¦s®æÅÜ°ÊÁÙ¬O·|­pºâ¡A¯à§ï¦¨E¨ìGÄæÅܰʤ~ÅÜ°Ê¡A¨ä¥LÄæÅÜ°Ê«h¤£ÅܰʶÜ??

TOP

¦^´_ 5# stillfish00


    ¨º¦pªG¥H§Ú¤¤¤åªº·N«ä³oµ{¦¡­n«ç»ò§ï??

TOP

¦^´_ 6# ÂŤÑÄR¦À
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range)
  3.     Application.EnableEvents = False
  4.     If Not Intersect(Target, [E1:E50000]) Is Nothing Or Not Intersect(Target, [G1:G50000]) Is Nothing Then
  5.         Range("H" & Target.Row).Formula = "=RC[-1]+RC[-2]"
  6.     End If
  7.     Application.EnableEvents = True
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# GBKEE


    G¤j·PÁ§A¡A´ú¸Õ¤w¸g¥i¥H¥Î¤F¡A·PÁÂ

TOP

¦^´_ 8# GBKEE


    G¤j¡A¦A¸ò§A½Ð±Ð¤@­Ó°ÝÃD
    Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Not Intersect(Target, [E1:E50000]) Is Nothing Or Not Intersect(Target, [G1:G50000]) Is Nothing Then
        Range("H" & Target.Row).Formula = "=RC[-1]+RC[-2]"
    End If
    Application.EnableEvents = True
End Sub

¦pªG¥H¤Wµ{¦¡¡A¦bHÄ泡¤À§Ú­n¥L¦bÀx¦s®æ­pºâ§¹¤§«á¼g¤Jªº¬O­È¡A¦Ó¤£¬O¤½¦¡¡A½Ð°Ý¤@¤UG¤jµ{¦¡­n«ç»ò§ï¡A³Â·Ð§A¤F

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD