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

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

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

Dear ¤j¤j

     ¤p§Ì²{¦³¤@­Ó°ÝÃD ´N¬O³øªí¦b¿é¤J®É,¨Ï¥ÎªÌ·|¸õµÛ¿é¤J¸ê®Æ,¦ý§Úªº¼gªk«oµLªk§JªA³o­Ó°ÝÃD
     ½Ð¤j¤j±Ð¾É¤@¤U¤p§Ì,¤]¶¶«K¦³·sªº«äºû,¥H«á¹J¨ì³o¼Ëªº°ÝÃD,´N¥i¥H¦Û¦æ¸Ñ¨M

    ªþ¥ó¬°°ÝÃD¤§½d¥» ¶¡Â_¿é¤J®Éµ{¦¡¦p¦ó§JªA20110107.rar (10.17 KB)
¾Ç²ß¤~¯à´£¤É¦Û¤v

³oºØ¥ØªºÀ³¸Ó¥ÎWorksheet_Change¨Æ¥ó¦Ó¤£¬OWorksheet_SelectionChange¨Æ¥ó¡C
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Count > 1 Or Target.Column <> 2 Then Exit Sub
  3. On Error Resume Next
  4. Target(1, 2) = Sheet2.[b:b].Find(Target, , , 1)(1, 2).Value
  5. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# oobird
  

     Dear ¤j¤j~  §Ú±N§A¼¶¼gªºµ{¦¡½X©ñ¤J¨ì½d¥»¤¤,¦ý°õ¦æ«o§¹¥þµL¥ô¦ó°Ê§@
                :dizzy:
              ¤j¤j ¤§«e§Ú¤]¦³¸Õ¹LPrivate Sub Worksheet_Change(ByVal Target As Range)
                     ¦ý¥i¯à§Úªº¼gªk¤W¦³¿ù~ ¥¦·|¤@ª½­pºâ
              ©Ò¥H~ §Ú¤~§ï¦¨Private Sub Worksheet_SelectionChange(ByVal Target As Range)
                       ·í¿ï¾Üªº¦³§ïÅܮɴN­pºâ~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 2# oobird

Dear ¤j¤j

     «á¨Ó§Ú¦³´ú¸Õ§â¨ä¤¤ªº¤@¦æ®³±¼´N¥i¥H¹F¨ì»Ý¨D,¦ý³o¦æ®³±¼·|¤£·|¦³¤°»ò¼Ëªº°ÝÃD©O??

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Or Target.Column <> 2 Then Exit Sub  <----§â¸Ó¦æ®³±¼´N¥i¥H°õ¦æ
On Error Resume Next
Target(1, 2) = Sheet2.[b:b].Find(Target, , , 1)(1, 2).Value
End Sub
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

If Target.Count > 1 Or Target.Column <> 2 Then Exit Sub  
³o¦æ¬O­­©w¹ï³æ¤@Àx¦s®æ¿é¤J¦P®É¿é¤JªºÄæ¦ì¥²¶·¬ObÄæ¤~·|°õ¦æ°Ê§@¡C
§A­Y®³±¼·|¦b¥ô¦ó¦a¤è¿é¤J©Î§ïÅܮɳ£°õ¦æ¡C

TOP

¦^´_ 5# oobird

    Dear ¤j¤j
     Target <---³o­Ó·N«ä¬O¤°»ò §Ú¥ÎF1¬d¸ß³Q¥¼§ä¨ì³o­Ó¦rªº¥Îªk¸ò»¡©ú
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

Dear ¤j¤j

     ­Y°²³]§Ú»Ý­n±qData1»PData2¤¤ ¦U¦ÛªºSheet¤¤¤ñ¹ï¸ê®Æ«á,±N¸ê®Æ±a¥X¨Ó,³o¼Ë¸Ó¦p¦ó­×§ï
     »¡©ú:
       1. ¦bsheet[¿é¤J]¤¤,{A}¶ñ¤J¸ê®Æ±a¥XDATA1¤¤ªºBÄæ¦ì¸ê®Æ
     2. §Q¥ÎBÄæ¦ì¸ê®Æ±a¥XDATA2¤¤CÄæ¦ì¸ê®Æ
        (¥ý«e±ø¥óData1»PData2ªºªí®æ¸ê®Æ¬O¦b¥¼¥[¤u¥B¤£¯à¾ã¦X¦b¤@°_ªº±¡ªp¤U)
     °ÝÃD¦pªþ¥ó¤§½d¥» ¶¡Â_¿é¤J®É µ{¦¡¦p¦ó§JªA_©µ¦ùÃD2.rar (12.47 KB)
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 6# hugh0620
¦^´_ 7# hugh0620
  1. Private Sub Worksheet_Change(ByVal ÅÜ¼Æ As Range)
  2.     Dim I
  3.     If ÅܼÆ.Count > 1 Or (ÅܼÆ.Column <> 2 And ÅܼÆ.Column <> 3) Then Exit Sub
  4.         If ÅܼÆ.Column = 2 Then
  5.             Sh = "Data1"
  6.             I = Application.Match(ÅܼÆ, Sheets("Data1").[B:B], 0)
  7.             If IsNumeric(I) Then
  8.             ÅܼÆ(1, 2) = Sheets("Data1").Cells(I, "C")
  9.             Else
  10.                 ÅܼÆ(1, 2) = ""
  11.             End If
  12.         ElseIf ÅܼÆ.Column = 3 Then
  13.             I = Application.Match(ÅܼÆ, Sheets("Data2").[B:B], 0)
  14.             If IsNumeric(I) Then
  15.                 ÅܼÆ(1, 2) = Sheets("Data2").Cells(I, "C")
  16.             Else
  17.                 ÅܼÆ(1, 2) = ""
  18.             End If
  19.     End If
  20. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# hugh0620
¥Hoobirdª©¥Dªºµ{¦¡½X¨Ó­×§ïªº¸Ü
²Ä2¦æ§ï>3, ¦A·s¼W²Ä5¦æ§Y¥i~
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Count > 1 Or Target.Column > 3 Then Exit Sub
  3. On Error Resume Next
  4. Target(1, 2) = Sheet2.[b:b].Find(Target, , , 1)(1, 2).Value
  5. Target(1, 2) = Sheet3.[b:b].Find(Target, , , 1)(1, 2).Value
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# GBKEE


    Dear ¤j¤j
        §Aªº¤è¦¡¥i¥H§¹¥þ¸Ñ¨M§Úªº°ÝÃD,¨Ã¥B¤]«Ü²³æªº¼W¥[(©ÎÂX¼W)§Úªº¨ä¥L±ø¥ó~
            ¦ý¤j¤j §Ú¦³´X­Ó¦a¤è¬Ý¤£À´
        1. ÅܼÆ.Count   ?????????
            2.IsNumeric(I) ¬O§_¸ÑŪ IsNumeric§P§O[I]¬OTRUE©Î¬OFALSE

    ¥t¥~§Ú¬O¥Î¥t¥~¤@­Ó¤j¤jªº¼gªk¨Ó­×§ï,½Ð¤j¤jÀ°¦£¬Ý¤@¤U,³o¼Ëªº¼gªk¦³¤°»ò¼Ëªº¯Ê¥¢
   If (Target.Count > 1 Or Target.Column <> 2) And (Target.Count > 2 Or Target.Column <> 3) Then Exit Sub
         On Error Resume Next
         Target(1, 2) = Sheet2.[b:b].Find(Target, , , 1)(1, 2).Value
     If Target.Count > 2 Or Target.Column <> 3 Then Exit Sub
         On Error Resume Next
         Target(1, 2) = Sheet3.[b:b].Find(Target, , , 1)(1, 2).Value
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD