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

[µo°Ý] EXCEL Àx¦s®æ¦P¨B°ÝÃD½Ð¯q

[µo°Ý] EXCEL Àx¦s®æ¦P¨B°ÝÃD½Ð¯q

¨Ï¥Î ¨ç¼Æ ©Î VBA  ¦p¦ó¹F¦¨ ¤£¦P¤u§@ªíªºÄæ¦ì¡A¦³¦P¨B¥\¯à?
¦p ¤u§@ªí1 ªº A1 ¬° 2 ªº®É­Ô¡A¤u§@ªí2 ªº A1 ¤]µ¥©ó2¡C

¦ý¨â­Ó¤u§@ªí³£¯à¤¬¬Û¥´¦r¡A°²³]§Ú¦b¤u§@ªí1 ªº A1 ¥´¤W 5 ªº®É­Ô¡A¤u§@ªí2 ªº A1 µ¥©ó5¡AµM«á§Ú¦A¤u§@ªí2 ªº A1 ¥´¤W10¡A¤u§@ªí1 ªº A1 ¤]µ¥©ó10¡C
¨âªÌ¥i¥H¤¬¬Û¥´¦r¨Ã¦P¨B¡C
¦³¤Wºôª¦¤å¹L¡A¦ý³£¤£¬O§Ú·Q­nªº¡C

½Ð°Ý¦U¦ì¤j¤j¡A¨ç¼Æ ©Î VBA ¸Ó¦p¦ó°µ¨ì¦¹¥\¯à?  

ÁÂÁÂ!

§A¥i¥H¨Ï¥Î
Private Sub Worksheet_Change ¨Ó°õ¦æ®@
§A¦b¤u§@ªí1 VBA ¶K¤W³o­Ó

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
   If Target.Address = "$A$1" Then Sheets("¤u§@ªí2").Range("A1").Value = [A1].Value
Application.EnableEvents = True
End Sub

¦b¤u§@ªí2 VBA¡@¶K¤W³o­Ó
Private Sub Worksheet_Change(ByVal Target As Range)  
Application.EnableEvents = False
   If Target.Address = "$A$1" Then Sheets("¤u§@ªí1").Range("A1").Value = [A1].Value
Application.EnableEvents = True
End Sub

³o¼Ë´N¥i¥H¤F

TOP

¦^´_ 2# edmondsforum

¥¿¸Ñ¡A¥i¥H¦P¨B¤F¡A·PÁ±zªº¨ó§U¡C:lol

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD