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

[µo°Ý] ³o­Ó¥i¥H¨Ï¥ÎIF¤½¦¡¶Ü?

[µo°Ý] ³o­Ó¥i¥H¨Ï¥ÎIF¤½¦¡¶Ü?

½Ð¦U¦ì¬Ý¬Ý§Ú¸Ó¥Î­þºØ¤½¦¡¤~¹ï!!

²Ä¤@¡G§Ú²{¦b¦³¤@­Ó¤½¦¡¬O=SUM(D2+F2-(C2))

²Ä¤G¡G  §Ú²{¦b­n¦h¼W¥[¤@­Ó¤½¦¡¬O   E2ªº¼Æ­È·|¸òµÛD2¶]   ¤]´N¬O    ¤µ¤ÑD2 ¤£ºÞ¬O10   ¡A    20    ¡A21.......

E2ªº¼Æ­È·|¸òµÛ D2  ¨«   ¡A µM«á¦A±a¤J¨ì²Ä¤@­Ó¤½¦¡¥h¹Bºâ!!

½Ð°Ý§Ú¸Ó¥Î¬Æ»ò¼Ëªº¤½¦¡?  ¬OIF¶Ü?

½Ð¦U¦ìÀ°À°§Ú!!!§Ú¤w¸g·Q¤£¥X¨Ó¸Ó¥Î¬Æ»ò¤F!!!!

¥»©«³Ì«á¥Ñ register313 ©ó 2012-1-1 19:12 ½s¿è

¦^´_ 1# appr
¤½¦¡1 :   =D2+F2-C2  ©Î =SUM(D2,F2,-C2)
¤½¦¡2 :   E2=D2   
             E2ªº¼Æ­È·|¸òµÛD2¨«¡AµM«á¦A±a¤J¨ì²Ä¤@­Ó¤½¦¡¥h¹Bºâ

¤½¦¡1¸Ì¨Ã¨S¦³¥X²{E2 ¦p¦ó§âE2¥N¤J¤½¦¡1¥h¹Bºâ???

¬O³o¼Ë¶Ü
¤½¦¡1 :   =D2+E2-C2  ©Î =SUM(D2,E2,-C2)
¤½¦¡2 :   E2=D2

TOP

©êºp¬O§Ú¤Ö»¡¤F

E2¬O§Ú¦h¼W¥[ªº¤@­Ó°²³]­È     ¥¦·|¥ýD2ªº­È¬Û¤¬©IÀ³¡A ¤]´N¬O»¡D2 ªº­È©ÎªÌ¬OE2 ¥u­n§ó°Ê¨ì¨ä¤¤¤@­Ó

¨º¥t¥~¤@­Ó­È¤]·|§ó°Ê

°²³]D2 ¬° 20    E2 À³¬°20     ­YD2§ó¥¿¬°15    E2À³¥ß§Y§ó°Ê¬°15

¤§«á¦A±a¤J²Ä¤@­Ó¤½¦¡¤¤ ¡A ¤]´N¬O=SUM(D2+F2-(C2))

TOP

¥»©«³Ì«á¥Ñ register313 ©ó 2012-1-1 22:49 ½s¿è

¦^´_ 3# appr
D2»PE2¨âÅܼƤ§­È¬JµM¤@©w¬Ûµ¥ ¬°¦ó¤£¥u¥Î¤@­ÓÅܼƩO?

¦pªG¤@©w­nD2»PE2¨âÅܼƳs°Ê ¨º¥i¯à¤@©w­n¥ÎVBA¤~§@ªº¨ì
  1. Private Sub worksheet_change(ByVal target As Range)
  2. If target.Address = "$D$2" Then
  3.    Range("E2") = Range("D2")
  4. End If
  5. If target.Address = "$E$2" Then
  6.    Range("D2") = Range("E2")
  7. End If
  8. End Sub
½Æ»s¥N½X
Book1.rar (5.76 KB)

TOP

°ò¥»¤WD2¸òE2­È¬O¤@¼Ëªº¡A¬O½T©wªº!!!!¦pªG­n¥Î¦P¤@­ÓÅܼƬO¥i¥Hªº!!!

¥u¬O®t¦b©óE2¬OD2ªþÄÝ»¡©ú©³¤Uªº²Ó¶µ!!!¦pªG¥i¥Hªº¸Ü§Ú¤]¤£·Q~"~

©Ò¥H¤£Åã¥Ü¥X¨Ó!!!¦³®É­Ô·|³y¦¨¶µ¥Ø¤Wªº²V¶Ã

«z~~~~~­n°Ê¥Î¨ìVBA ¨º§Ú¯uªº¥²¶·¦n¦n¬ã¨s¤@¤U!!!·PÁ¦U¦ìªºÀ°¦£

TOP

§Ú¥H«e³£¦Û¤v³]¤@­Óbutton¡A¦ý¬O³o¼Ë­n«ö¤@¤U¤~¯à§ó·s

¦pªG­nÀx¦s®æªº¼Æ­È§Y®É§ó·s¡A«Øij¨Ï¥Î¦Û­q¨ç¼Æªº¤èªk·|¤ñ¸û¦n

TOP

¦Û­q¨ç¼Æ?¬O­n¥Î­þ¤@­Ó???   ©êºp§Ú¬O¯uªº¤~¤S­è¶}©l­«¾Çªº.....©Ò¥Hº¡¦h¤£À´±o!!!

¤è«Kªº¸Ü¡A¥i¥H¦A¸Ô²Ó¸Ñµª¤@¤U¶Ü?   ·PÁÂ!!!!

TOP

¦^´_ 7# appr

¥ý¦bVBA½s¿è¾¹·s¼W¤@­Ó¼Ò²Õ¡A§â¤U­±ªºFunction¶K¤W

Function E2_equal_D2(SelectValue)
E2_equal_D2 = SelectValue
End Function

ÂI¿ïE2¡A´¡¤J¨ç¼Æ¡A§A·|µo²{¦h¤@­Ó¡i¨Ï¥ÎªÌ©w¸q¡j¿ï¶µ¡AÂI¤U¥h´N¥i¥H¬Ý¨ì³o­Ó¦Û­q¨ç¼Æ E2_equal_D2

¦]¬°¦³³]©w¤Þ¼Æ¡A©Ò¥H­n§â¤Þ¼Æ«ü©wD2¡A¸ò¥­±`¨Ï¥Î¨ç¼Æ¤@¼Ë¡AÂI¤@¤UD2´N¥i¥H¤F

§A¥i¥H¸Õ¤@¤U¡A¦p¦¹D2ªº¼Æ­È¤@§ïÅÜ¡AE2·|ÀHµÛ§ïÅÜ

­ì¥»ªº =SUM(D2+F2-(C2)) ¨ÌÂÂ¥i¥H­pºâ

TOP

¤£¦n·N«ä²{¦b¤~¦^!!!¦ý§Ú²{¦b¤~·|¤F......

TOP

¦^´_ 8# lcc_seven


    ¤£¦n·N«ä§Ú·Q¦b½Ð°Ý¤@­Ó°ÝÃD!!!
²{¦b§Úªº¤èªk¬O¨Ï¥Îlcc_seven  ¥Î¼Ò²Õªº¤èªk!!!¦ý¬O¬°¤F­n§ó§ï

§Ú¥Ø«eªº²Â¤èªk¬O¨Ï¥Î½Æ»s¶K¤WµM«á¦b§ó§ï¦WºÙ!!!

¦ý­nª½±µ¥[¨ì²Ä¤@­Ó¼Ò²Õ¸Ì­±«oµo¥Í½s¿è¿ù»~~"~

¦ý¦pªG¥ÎVBªº¸Ü¬O¸Ó«ç»ò­×§ï???¦³ÂI·d¤£²M·¡¤F!!!

¥t¥~¦pªG·Q­n¸ò¤U­±ªº³o­Ó°µµ²¦X
¬Oª½±µ¦b©¹¤U­±¥[¤J´N¦n¶Ü??
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Set RngA = Range("A2:A4")
  3. Set RngB = Range("B2:B4")
  4. Set RngCA = Intersect(Target, RngA)
  5. Set RngCS = Intersect(Target, RngB)
  6. If Not RngCA Is Nothing Then
  7.    RngCA.Offset(0, 2) = RngCA.Offset(0, 2) + RngCA.Value
  8.    RngCA.Value = ""
  9. End If
  10. If Not RngCS Is Nothing Then
  11.    RngCS.Offset(0, 1) = RngCS.Offset(0, 1) - RngCS.Value
  12.    RngCS.Value = ""
  13. End If
  14. End Sub
½Æ»s¥N½X
¨º§Ú¥[¤J«á¡AÁÙ¬O·|µo¥Í¦WºÙ¿ù»~!!!

¨º¬O»Ý­n¬Æ»òªº³sµ²¦WºÙ¶Ü?

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD