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

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

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

Á|¨Ò
A1¼Æ¦r100
A2¿é¤J50«ö¤Uenter«á¦Û°Ê²MªÅA2¼Æ¦r
A3µ¥©óA1+A2ªºµ²ªG150
½Ð°Ý¸Ó¦p¦ó¼g©O¡H

ÁÂÁ¤j¤j

¦^´_ 18# coafort


    ®¥³ß«e½ú
³Ì«á¤@¦æ¦h¤F¤@­ÓOption Explicit:
º|§Rªº,Option Explicit¬O¥Î¨ÓÀË´úÅܼƬO§_³£°µ¤F«Å§i
ÁÂÁ«e½ú,½Ð±`¤@°_¾Ç²ß!
¥Î¦æ°Ê¸Ë¸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

¥»©«³Ì«á¥Ñ 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 ©ó 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

¦^´_  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 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

¦^´_ 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

¥»©«³Ì«á¥Ñ 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

¦^´_  coafort


    ÁÂÁ«e½úÄ~Äò¤@°_¾Ç²ß
¥H¤U¬O½s¿èIJµo $A$2 ,$B$2 $B$2 ªº´ú¸Õ½X,½Ð«e½ú¸Õ§ï¦¨©Ò ...
Andy2483 µoªí©ó 2023-2-17 09:15


«D±`·PÁ¤j¤jªºÀ°¦£
¦^À³³t«×§Ö³t
µ{¦¡ºë·Ç
·P®¦

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD