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

¦^´_ 1# coafort


    ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾Ç«ØijvbaIJµoªº¤è¦¡

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
'¡ô¦pªGIJµo½s¿èÀx¦s®æ¦ì§}¬O ""$A$2""
   If IsNumeric([A1]) And IsNumeric([A2]) And [A2] <> "" Then
   '¡ô¦pªGIsNumeric()§PÂ_[A1]¬O¼Æ­È,IsNumeric()§PÂ_[A2]¤]¼Æ­È,¦Ó¥B[A2]¤£¬OªÅ¦r¤¸
      [A3] = [A1] + [A2]: [A2] = ""
      '¡ô¥O[A3]Àx¦s®æ­È=[A1]Àx¦s®æ­È+[A2]Àx¦s®æ­È: µM«á¥O[A2]Àx¦s®æ­È¬OªÅ¦r¤¸
   End If
End If
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾Ç«ØijvbaIJµoªº¤è¦¡

Option Explicit
Private Sub Wo ...
Andy2483 µoªí©ó 2023-2-16 11:42

³ø§i¤j¤j
¨S§@¥Î
ÁÂÁÂ

TOP

¦^´_ 3# coafort


    ÁÂÁ«e½ú¦^´_
¤W¶Ç´ú¸ÕÀÉ,½Ð¤U¸ü¨Ó¸Õ¸Õ¬Ý
­pºâ«á¦Û°Ê§R°£.zip (7.92 KB)
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ÁÂÁ«e½ú¦^´_
¤W¶Ç´ú¸ÕÀÉ,½Ð¤U¸ü¨Ó¸Õ¸Õ¬Ý
Andy2483 µoªí©ó 2023-2-16 14:07


°Ú
§Ú·d¿ù¤F
À³¸Ó¬O³o¼Ë
A1 100
A2 ¿é¤J50
A1·|Åܦ¨150
A2®ø¥¢
¯u¬O¤£¦n·N«ä
³Â·Ð¤j¤j
ÁÂÁ¤j¤j

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-16 15:25 ½s¿è

¦^´_ 5# coafort


    ÁÂÁ«e½ú¦A¦^´_
½Ð«e½ú±N¤u§@ªí¼Ò²Õ¤U­ì¨Óªºµ{¦¡½X´«¦¨ ¤U¦Cµ{¦¡½X,µM«á¦A¾Þ§@¸Õ¸Õ¬Ý

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
'¡ô¦pªGIJµo½s¿èÀx¦s®æ¦ì§}¬O ""$A$2""
   If IsNumeric([A1]) And IsNumeric([A2])  Then
   '¡ô¦pªGIsNumeric()§PÂ_[A1]¬O¼Æ­È,IsNumeric()§PÂ_[A2]¤]¬O¼Æ­È
      Application.EnableEvents = False
      '¡ô¥OIJµo¥¢®Ä
      [A1] = [A1] + [A2]: [A2] = ""
      '¡ô¥O[A1]Àx¦s®æ­È=[A1]Àx¦s®æ­È+[A2]Àx¦s®æ­È: µM«á¥O[A2]Àx¦s®æ­È¬OªÅ¦r¤¸
      Application.EnableEvents = True
      '¡ô¥O«ì´_IJµo
   End If
End If
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_  coafort


    ÁÂÁ«e½ú¦A¦^´_
½Ð«e½ú±N¤u§@ªí¼Ò²Õ¤U­ì¨Óªºµ{¦¡½X´«¦¨ ¤U¦Cµ{¦¡½X,µM«á¦A¾Þ§@¸Õ ...
Andy2483 µoªí©ó 2023-2-16 15:22


¥i¥H¤F
«D±`·PÁ¤j¤j

TOP

¦^´_  coafort


    ÁÂÁ«e½ú¦^´_
¤W¶Ç´ú¸ÕÀÉ,½Ð¤U¸ü¨Ó¸Õ¸Õ¬Ý
Andy2483 µoªí©ó 2023-2-16 14:07


½Ð°Ý¤j¤j
¦pªG§Ú¦³¤T­Ó¶µ¥Ø»Ý­n³oºØ¥\¯à
½Ð°Ý­n«ç»ò¥[¤J¡H
ÁÂÁÂ

TOP

¦^´_ 8# coafort


    ÁÂÁ«e½úÄ~Äò¤@°_¾Ç²ß
¥H¤U¬O½s¿èIJµo $A$2 ,$B$2 $B$2 ªº´ú¸Õ½X,½Ð«e½ú¸Õ§ï¦¨©Ò²Å¦X»Ý¨Dªº,©Î¤W¶Ç½d¨Ò




Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
'¡ô¦pªGIJµo½s¿èÀx¦s®æ¦ì§}¬O ""$A$2""
   If IsNumeric([A1]) And IsNumeric([A2]) Then
   '¡ô¦pªGIsNumeric()§PÂ_[A1]¬O¼Æ­È,IsNumeric()§PÂ_[A2]¤]¬O¼Æ­È
      Application.EnableEvents = False
      '¡ô¥OIJµo¥¢®Ä
      [A1] = [A1] + [A2]: [A2] = ""
      '¡ô¥O[A1]Àx¦s®æ­È=[A1]Àx¦s®æ­È+[A2]Àx¦s®æ­È: µM«á¥O[A2]Àx¦s®æ­È¬OªÅ¦r¤¸
      Application.EnableEvents = True
      '¡ô¥O«ì´_IJµo
   End If
End If
If Target.Address = "$B$2" Then
'¡ô¦pªGIJµo½s¿èÀx¦s®æ¦ì§}¬O ""$B$2""
   If IsNumeric([B1]) And IsNumeric([B2]) Then
      Application.EnableEvents = False
      [B1] = [B1] + [B2]: [B2] = ""
      Application.EnableEvents = True
   End If
End If
If Target.Address = "$C$2" Then
'¡ô¦pªGIJµo½s¿èÀx¦s®æ¦ì§}¬O ""$C$2""
   If IsNumeric([C1]) And IsNumeric([C2]) Then
      Application.EnableEvents = False
      [C1] = [C1] + [C2]: [C2] = ""
      Application.EnableEvents = True
   End If
End If
End Sub

¯¬¶¶§Q! ¬ü¦nªº¤@¤Ñ!
¥Î¦æ°Ê¸Ë¸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 : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD