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

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

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

1.JPG





½Ð°Ý
§Ú¦bsheet1(¹Ï¤@)ºñ¦â¦a¤è¿é¤J¤ë¥÷¡B¼t°Ó¦WºÙ¡Bª÷ÃB
«ö¤U«ö¶s¤§«á
ª÷ÃB·|¶]¨ìsheet2(¹Ï¤G)©Msheet3(¹Ï¤T)²Å¦X¬Û¦P¼t°Óªº¦W¦rªºÀx¦s®æ¤º

¥»©«³Ì«á¥Ñ flutist ©ó 2012-11-21 16:03 ½s¿è

·PÁª©¥DGBKEE ¤j¤j¸Ñ¨M§Úªº°ÝÃD¤F:)

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

¥»©«³Ì«á¥Ñ mark15jill ©ó 2012-11-21 14:42 ½s¿è

¦^´_ 4# flutist

§A³o·|¦³´X­Ó°ÝÃD..
1.¬Û¦P¼t°Ó¡G
    ¦pªG¤µ¤Ñ   Sheet2©M Sheet3 ¦P®É¦³  ©° ¼t°Ó §A­n§PÂ_­þ­Ó???
2.¶µ¥Ø¨S¦³¡G
   ¤S©ÎªÌ ³£¨S¦³¦b¸Ì­± ¨º­n§PÂ_?
3.§PÂ_¦C¼Æ¡G
    ­Y¨Ì·ÓªþÀɪº¸Ü¡A³£¬O¦b²Ä8¦C(¾î)¡A¬O­n¥H¨º­Ó¬°°ò·Ç?

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

test.rar (7.7 KB)

¦U¦ì¤j¤j¡A§Ú¤W¶ÇªþÀɤW¨Ó¤F
½Ð°Ý¦p¦ó§ó¥¿¡H
­è­è¥Î·j¯Áªº§äsheetªº¬ÛÃö°ÝÃD¡AÁÙ¬O¨S¬ÝÀ´

TOP

¦^´_ 2# flutist

«Øij§âªþÀɶǤW¨Ó
³o¼Ë¨ä¥L¤j¤j­Ì¤~¤ñ¸ûª¾¹D°ÝÃDÂI¦b­þ
ªþ±a¤@´£

±z©Ò¸ß°Ýªº°ÝÃD½×¾Â¤º¦³Ãþ¦ü©«
¥i¥H·j¯Á¬Ý¬Ý

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

³o¼Ë³]­p·|¥X²{¨S¦³³]©wª«¥óÅܼơA»Ý­×§ï­þ¸Ì¡H

Sub «ö¶s1_Click()
    Dim ¤ë¥÷As Range,¼t°ÓAs Range
    With Sheets("Sheet2").Range("A8")
        Set ¤ë¥÷ = Sheets("Sheet2").Range(.Cells, .Cells.End(xlToRight)).Find([A2], LookAT:=xlWhole)
        Set ¼t°Ó = Sheets("Sheet2").Range(.Cells, .Cells.End(xlDown)).Find([B2])
        Sheets("Sheet2").Cells(¼t°Ó.Row,¤ë¥÷.Column) = Sheets("Sheet1").Range("C2")
    End With
   
    With Sheets("Sheet3").Range("A8")
        Set ¤ë¥÷ = Sheets("Sheet3").Range(.Cells, .Cells.End(xlToRight)).Find([A2], LookAT:=xlWhole)
        Set ¼t°Ó = Sheets("Sheet3").Range(.Cells, .Cells.End(xlDown)).Find([B2])
        Sheets("Sheet3").Cells(¼t°Ó.Row, ¤ë¥÷.Column) = Sheets("Sheet1").Range("C2")
    End With
End Sub

TOP

ÁÂÁ¸ѵª¡A§Úªº°ÝÃD¸Ñ¨M¤F

¦ýÁÙ¦³¥t¥~¤@­Ó°ÝÃD

°²³]§Úªº³øªí¦p¹ÏA8~D11¬O¤À§G¦b3­ÓSheet

§Ú­n¦p¦ó°µ­×§ï¡A­è­è·Q¤F¦n¤[³£¨S·Q¥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

¦^´_ 4# flutist


Option Explicit
©ñ¦b³Ì¤W­±

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD