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

¦p¦ó¦bsheet1¿é¤J¸ê®Æ«ü©w¨ìsheet2©Îsheet3

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-11-20 16:53 ½s¿è

¦^´_ 2# flutist
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim ¤ë¥÷ As Range, ¼t°Ó As Range
  4.     With [A8]
  5.         Set ¤ë¥÷ = Range(.Cells, .Cells.End(xlToRight)).Find([A2], LookAT:=xlWhole)
  6.         Set ¼t°Ó = Range(.Cells, .Cells.End(xlDown)).Find([B2])
  7.         Cells(¼t°Ó.Row, ¤ë¥÷.Column) = [C2]
  8.     End With
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# flutist
¤£¦n·N«ä,¦p 5# c_c_lai »¡ªº§Ú¤Ö¶K¤@­Ó O,Ãö©óµ{¦¡½X§A©|»Ý¦h½m²ßµ{¦¡¬O¦p¦ó¼gªº
¥H¤Uµ{¦¡½X¦P2#ªºµ{¦¡½X
  1. Option Explicit '¦b¼Ò²Õ¼h¦¸¤¤±j­¢¨C­Ó¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
  2. 'Option Explicit ½Ðª`·N Option Explicit ³¯­z¦¡¥²¥X²{¦b¼Ò²ÕùØ¡A¥B¦b¥ô¦óµ{§Ç¤§«e
  3. 'µ{§Ç¤¤¶¡¤£¥i¦A«Å§i¨ä¥LªºSubµ{§Ç
  4. Sub «ö¶s_Click()  '«Å§iSub µ{§Ç¦WºÙ¬°"«ö¶s_Click"
  5. 'Sub Ex()   '«Å§iSub µ{§Ç¦WºÙ¬°"Ex"
  6. 'End Sub    'End ³¯­z¦¡ µ²§ô¤@­Óµ{§Ç©Î°Ï¶ô
  7.     Dim ¤ë¥÷ As Range, ¼t°Ó As Range
  8.     With [A8]
  9.         Set ¤ë¥÷ = Range(.Cells, .Cells.End(xlToRight)).Find([A2], LookAT:=xlWhole)
  10.         Set ¼t°Ó = Range(.Cells, .Cells.End(xlDown)).Find([B2])
  11.         Cells(¼t°Ó.Row, ¤ë¥÷.Column) = [C2]
  12.     End With
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 12# flutist
  1. Option Explicit
  2. Sub «ö¶s1_Click()
  3.     Dim Sh As Variant,¤ë¥÷ As Range, ¼t°Ó As Range
  4.     For Each Sh In Array("Sheet2", "Sheet3")  '¤u§@ªíªº°}¦C
  5.         With Sheets(Sh)
  6.             Set ¤ë¥÷ = .Range("A8", .Range("A8").End(xlToRight)).Find(Sheets("Sheet1").[a2], LookAT:=xlWhole)
  7.             Set ¼t°Ó = .Range("A8", .Range("A8").End(xlDown)).Find(Sheets("Sheet1").[B2])
  8.             '«Å§i¤ë¥÷,¼t°Ó¬°Range(ª«¥ó),¦ýFind¦p§ä¤£¨ì(ª«¥ó)¬°Nothing
  9.             If Not ¤ë¥÷ Is Nothing And Not ¼t°Ó Is Nothing Then
  10.                 Sheets(Sh).Cells(¼t°Ó.Row, ¤ë¥÷.Column) = Sheets("Sheet1").Range("C2")
  11.             End If
  12.         End With
  13.     Next
  14. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD