ªð¦^¦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

¦^´_ 13# luhpro


    ·PÁ¤j¤j§Úª¾¹D¤F

TOP

¦^´_ 12# ÂŤÑÄR¦À
¤Ó¦h³o­Ó'

³o¬OVBAªºª`¸Ñ²Å¸¹
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 10# ÂŤÑÄR¦À
³o¸Ì´£¨Ñ¥t¥~¤@­Ó¤èªk¨Ó¹ê²{ :
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.   Application.EnableEvents = False
  3.    
  4.   With Target
  5.     If .Row < 50001 Then
  6.       Select Case .Column
  7.       Case 5 To 7
  8.         .Parent.Cells(.Row, 8) = .Offset(0, -1) + .Offset(0, -2)
  9.       End Select
  10.     End If
  11.   End With
  12.   
  13.   Application.EnableEvents = True
  14. End Sub
½Æ»s¥N½X

TOP

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

¦^´_ 11# GBKEE


    G¤j¡A©êºp¤p§Ì¤~²¨¾Ç²L¡A¥i¥H½ÐG¤j»¡©ú¤@¤U¶Ü??
    «°¥«¸Ì­±¤Ó¦h³o­Ó'¡A§Ú¤£ª¾¹D­n«ç»ò¬Ý¡A­þ¨Ç¬O­nªº­þ¨Ç¬O¤£»Ý­nªº??

TOP

¦^´_ 10# ÂŤÑÄ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.          With Range("H" & Target.Row)
  7.             ' .Formula = "=RC[-1]+RC[-2]" ' =>  .Value = "=RC[-1]+RC[-2]"
  8.             .Value = .Offset(0, -1) + .Offset(0, -2)
  9.             'RC[-1] => .Offset(0, -1)
  10.             'RC[-2] => .Offset(0, -2)
  11.         End With
  12.     End If
  13.     Application.EnableEvents = True
  14. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

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

¦^´_ 8# GBKEE


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

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

¦^´_ 5# stillfish00


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

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD