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

¶¡Â_¿é¤J®É ¦p¦óÅýµ{¦¡¤]¥i¥H±a¥X¸ê®Æ

¦^´_ 10# hugh0620
1. ÅܼÆ.Count   ?????????
Private Sub Worksheet_Change(ByVal ÅÜ¼Æ As Range)
Range¬Oª«¥ó  .Count ¶Ç¦^ª«¥ó¤l¶°¦Xªº­p¼Æ

2.IsNumeric(I) ¬O§_¸ÑŪ IsNumeric§P§O[I]¬OTRUE©Î¬OFALSE
   ¹ïªº

§A©Òªþ¤Wªºµ{¦¡¥i°Ñ¥i9¼Ó©Ò­×§ïªºµ{¦¡½X¸û¬°Â²¼ä
On Error Resume Next ¨Ï¥Î¤W­n¤p¤ß ,¦pµ{¦¡½X¦³¼g¿ù«á,°õ¦æ¤W¬O¤£©ö¬d¥X¿ù»~¦b­þ¸Ìªº.

TOP

¦^´_ 11# GBKEE

   ÁÂÁ¤j¤jªº´£¿ô~ ¦b¨Ï¥Î¤W·|ÄYÂÔ¨Ç
    ¤j¤j¬O§_¥i¥HÁ|¨Ò On Error Resume Next ·|¤£©ú©öµo²{¿ù°Èªº±¡ªp~ µ¹«á¾Çªº±ß½ú°Ñ¦Ò~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 11# GBKEE


    Dear ¤j¤j
        ­ü~ ¤S¦³°ÝÃD¤F
        ¦]¬°§Úªº¸ê®Æ¿é¤J¦@¤À¦¨¨â¶ô
        Part1:¿é¤J[A]«á±a¥X[B][C]
            Part2:¿é¤J[B1][C1]±a¥X[A1]  PS:Part1»PPart2¦b¦P¤@¦æ¤W,¥i¥H¤À§Oº¡¨¬¦U¦Ûªº±ø¥ó«á,¦Û¦æ­«ÂйBºâ
            ¥ÎWorksheet_SelectionChange©ÎWorksheet_Change,¥i¥H¦Û°Ê¥~¥X[A][A1],¦ý¬O»Ý­n[A]¦A«ö¤@¦¸(CHANGE),¤~·|¦A¹Bºâ
        °£¤F¥ÎCommandButton(¸Ó¶ñªº¦a¤è¶ñ§¹«á¦A«ö),¬O§_¦³¨ä¥L¤è¦¡¥i¥H§JªA,¥u­n§Úº¡¨¬§Ú©Ò»Ý­nªº±ø¥ó«á,´N­pºâ
        ªþ¥ó¬°°ÝÃD¤§½d¥» ¶¡Â_¿é¤J®É µ{¦¡¦p¦ó§JªA_©µ¦ùÃD3.rar (12.85 KB)
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¨Ò¦pa1»Pb1Àx¦s®æ³£¬O¤å¦r¤£¬O¼Æ¦r¡A¤£¯à°µ¹Bºâ¡C
µ{¦¡½X¡G
On Error Resume Next
[c1] = [a1] * [b1]
³o¼Ë¥¦¤£·|§i¶D§A¥ô¦ó¿ù»~°T®§¡C

TOP

¦^´_ 13# hugh0620
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Count > 1 Then Exit Sub
  3. Select Case Target.Column
  4. Case 2
  5. Set a = Sheets("DATA1").Columns(2).Find(Target, lookat:=xlWhole)
  6. If Not a Is Nothing Then Target.Offset(, 1) = a.Offset(, 1)
  7. Case 3
  8. Set a = Sheets("DATA2").Columns(2).Find(Target, lookat:=xlWhole)
  9. If Not a Is Nothing Then Target.Offset(, 1) = a.Offset(, 1)
  10. Case 6
  11. If Target <> "" And Target.Offset(, 1) <> "" Then Target.Offset(, -1) = Target * Target.Offset(, 1)
  12. Case 7
  13. If Target <> "" And Target.Offset(, -1) <> "" Then Target.Offset(, -2) = Target * Target.Offset(, -1)
  14. End Select
  15. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 15# Hsieh


    Dear ¤j¤j ­Y²{¦b§ï¦¨¥Î«ö¶s¦¡ªº¤è¦¡³B²z (¥D­n¬O§Ú¦³¤@³¡¥÷¸ê®Æ­n¦Û°Ê­pºâ~¤@³¡¥÷¬O»Ý­n¶×¥X«á¸ê®Æ¦^¶ñ«á¦A­pºâ~)
             ³o¼Ë ByVal Target As Range ¬O§_´NµLªk¨Ï¥Î¤F
             ¸Ó¦p¦ó³B²zÅý¶¡Â_ªº¸ê®Æ¥i¥H¦b«ö¤U«ö¶s«á¶i¦æ¹Bºâ~
                   °ÝÃD½d¥»¤£ÅÜ (³Ì«á¤@¦¸ªº½d¥»)
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 16# hugh0620
§Aªº°ÝÃDÀ³¸Ó¬O¥X¦b¬yµ{¤W
½Ð»¡©úÀɮרϥάyµ{¡A«ö¶s§@¥Î¬O¬Æ»ò?
§â°ÝÃD±Ô­z²M·¡¡A¤~¯à±o¨ì¸Ñµª
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# hugh0620
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Count > 1 Or Target.Column <> 2 Then
  3. Exit Sub
  4. End If
  5. On Error Resume Next
  6. Target(1, 2) = Sheet2.[B:b].Find(Target)(1, 2).Value
  7. Target(1, 3) = Sheet3.[B:b].Find(Target(1, 2))(1, 2).Value

  8. End Sub
½Æ»s¥N½X
¥t¥~«öÁä°ÝÃD,­n¦^¨ì¶Ç²Îªºsub(),³o¼Ë°µ·|«Ü³Â·Ð
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD