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

­pºâ«á¦Û°Ê§R°£

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Count > 1 Or .Item(1) = "" Then Exit Sub
     If Not Intersect(Range("a3:c3"), .Cells) Is Nothing Then
        .Cells(-1, 1) = Val(.Cells(-1, 1)) + Val(.Value)
        .ClearContents
     End If
End With
End Sub

A3:C3 >> A1:C1

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-17 11:21 ½s¿è

¦^´_ 11# ­ã´£³¡ªL
¦^´_ 11# coafort


    ÁÂÁ«e½ú«ü¾É
1.«á¾Ç¦b¦¹¥DÃD¨S¦³À³¥Î http://forum.twbts.com/thread-23842-1-1.html ¤ß±o¸gÅç,ÁÂÁ«e½ú«ü¾É
2.¨¾¤î³sÄòIJµo¤£¬O¥u©È¦AIJµo,¤]­nÀ´±o§ä¥X¤f,ÁÂÁ«e½ú
¾Ç²ß¤ß±oµù¸Ñ¦p¤U,½Ð¦A«ü¾É,ÁÂÁÂ

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
'¡ô¥H¤U¬OÃö©óÀx¦s®æ½s¿èIJµoªºµ{§Ç
     If .Count > 1 Or .Item(1) = "" Then Exit Sub
     '¡ô¦pªGIJµo®æ¼Æ¶q¤j©ó 1 ©ÎIJµo®æªÅ¥Õ!´Nµ²§ôµ{¦¡°õ¦æ
     If Not Intersect(Range("a2:c2"), .Cells) Is Nothing Then
     '¡ô¦pªGIJµo®æ¬O¦b[A2:A2]Àx¦s®æ¸Ì??
        .Cells(0, 1) = Val(.Cells(0, 1)) + Val(.Value)
        '¡ô¥OIJµo®æªº¤W¤è¨º®æªº­È + (IJµo®æ­È¥HVal ¨ç¼ÆÂà¤Æ¦^¶Çªº¼Æ­È)
        .ClearContents
        '¡ô²M°£Ä²µo®æªº¤º®e
        '¦¹²M°£ªºµ{§Ç¦A¦¸ªºÄ²µo¤F,¦ý¬O .Item(1) = "" ©Ò¥Hµ²§ôµ{¦¡°õ¦æ

     End If
End With
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 11# coafort


    «Øij¨Ï¥Î ­ã´£³¡ªL«e½úªº¤èªk§ó¤è«KÂX¥R¨Ï¥Î¸Ó¥\¯àªºÀx¦s®æ
¦b¥H¤Uµ{¦¡½XÂŦr³¡¦ì­×§ï,§Y¥iÂX¥R©ÎÅܧó
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Count > 1 Or .Item(1) = "" Then Exit Sub
     If Not Intersect([A2:C2,G2:I2], .Cells) Is Nothing Then
        .Cells(0, 1) = Val(.Cells(0, 1)) + Val(.Value)
        .ClearContents
     End If
End With
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ coafort ©ó 2023-2-21 16:53 ½s¿è
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Count > 1 Or .Item(1) = " ...
­ã´£³¡ªL µoªí©ó 2023-2-17 10:48


¯u¬O¤Ó·PÁ¤j¤j¤F
½Ð°Ý¤j¤j
§Ú¹ê»Ú¦ì¸m¬O
AQ212~AQ218¤ÎAQ212~AW218¤ÎBB221¬O¿é¤J¼Æ­ÈÄæ(IJµo)
AR212~AR218¤ÎAX212~AX218¤ÎBC221¬OÀx¦s®æ
½Ð°Ý­n«ç»ò§ï©O¡H
ÁÂÁ¤j¤j

TOP

¦^´_  coafort


    «Øij¨Ï¥Î ­ã´£³¡ªL«e½úªº¤èªk§ó¤è«KÂX¥R¨Ï¥Î¸Ó¥\¯àªºÀx¦s®æ
¦b¥H¤Uµ{¦¡½XÂŦr³¡¦ì ...
Andy2483 µoªí©ó 2023-2-18 08:42


¯u¬O¤Ó·PÁ¤j¤j¤F
½Ð°Ý¤j¤j
§Ú¹ê»Ú¦ì¸m¬O
AQ212~AQ218¤ÎAQ212~AW218¤ÎBB221¬O¿é¤J¼Æ­ÈÄæ(IJµo)
AR212~AR218¤ÎAX212~AX218¤ÎBC221¬OÀx¦s®æ
½Ð°Ý­n«ç»ò§ï©O¡H
ÁÂÁ¤j¤j

TOP

¥»©«³Ì«á¥Ñ coafort ©ó 2023-2-21 19:37 ½s¿è

¥´¿ù¤F
¬O
¯u¬O¤Ó·PÁ¤j¤j¤F
½Ð°Ý¨â¦ì¤j¤j
§Ú¹ê»Ú¦ì¸m¬O
AQ212~AQ218¤ÎAW212~AW218¤ÎBB221¬O¿é¤J¼Æ­ÈÄæ(IJµo)
AR212~AR218¤ÎAX212~AX218¤ÎBC221¬OÀx¦s®æ

§Ú§ï¦¨³o¼Ë
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
     If .Count > 1 Or .Item(1) = "" Then Exit Sub
     If Not Intersect([AQ212:AQ218,AW212:AW218,BB221], .Cells) Is Nothing Then
        .Cells(0, 1) = Val(.Cells(0, 1)) + Val(.Value)
        .ClearContents
     End If
End With
End Sub
¦ý¬O¥X¿ù¤F
½Ð°Ý­n«ç»ò§ï©O¡H
ÁÂÁ¤j¤j

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-22 08:04 ½s¿è

¦^´_ 16# coafort


    ÁÂÁ«e½ú¤@°_¾Ç²ß
½Ð«e½ú¦A´ú¸Õ¬Ý¬Ý,ÁÂÁÂ
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
'¡ô¥H¤U¬OÃö©óÀx¦s®æ½s¿èIJµoªºµ{§Ç
     If .Count > 1 Or .Item(1) = "" Then Exit Sub
     '¡ô¦pªGIJµo®æ¼Æ¶q¤j©ó 1 ©ÎIJµo®æªº¤U¤è®æ¬OªÅ¥Õ!´Nµ²§ôµ{¦¡°õ¦æ
     If Not Intersect([AQ212:AQ218,AW212:AW218,BB221], .Cells) Is Nothing Then
     '¡ô¦pªGIJµo®æ¬O¦b[A2:A2]Àx¦s®æ¸Ì??
        .Cells(1, 2) = Val(.Cells(1, 2)) + Val(.Cells(1, 1))
       '¡ô¥OIJµo®æªº¥kÃ䨺1®æªº­È + (IJµo®æ­È¥HVal ¨ç¼ÆÂà¤Æ¦^¶Çªº¼Æ­È)
        
        'IJµo®æ¥»¨­¬O.Cells(1,1), ¥k°¼1®æ¬O.Cells(1,2), ¥ª°¼1®æ¬O.Cells(1,0),
        '¤W¤è1®æ¬O.Cells(0,1), ¤U¤è1®æ¬O.Cells(2,1)

        
        .ClearContents
        '¡ô²M°£Ä²µo®æªº¤º®e
        '¦¹²M°£ªºµ{§Ç¦A¦¸ªºÄ²µo¤F,¦ý¬O .Item(1) = "" ©Ò¥Hµ²§ôµ{¦¡°õ¦æ
     End If
End With
End Sub
Option Explicit
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ÁÂÁ«e½ú¤@°_¾Ç²ß
½Ð«e½ú¦A´ú¸Õ¬Ý¬Ý,ÁÂÁÂ
Option Explicit
Private Sub Worksh ...
Andy2483 µoªí©ó 2023-2-22 07:35


·PÁ¤j¤j
¥i¥H¥Î¤F
¹ï¤F
¤j¤j³Ì«á¤@¦æ¦h¤F¤@­ÓOption Explicit

TOP

¦^´_ 18# coafort


    ®¥³ß«e½ú
³Ì«á¤@¦æ¦h¤F¤@­ÓOption Explicit:
º|§Rªº,Option Explicit¬O¥Î¨ÓÀË´úÅܼƬO§_³£°µ¤F«Å§i
ÁÂÁ«e½ú,½Ð±`¤@°_¾Ç²ß!
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD