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

°ÝÃD!!·j´M­È¦^¶Ç

¥»©«³Ì«á¥Ñ yen956 ©ó 2014-2-27 18:52 ½s¿è

¦^´_ 1# kevin21522886
¸Õ¸Õ¬Ý:
  1. Option Explicit

  2. Sub ³Ì·sª©()
  3.     Dim x, y As Worksheet
  4.     Dim cnt, i As Integer
  5.     Dim Rng, FindCell As Range
  6.     Dim FindStr As String
  7.     Set x = Sheets(1)
  8.     cnt = ThisWorkbook.Sheets.Count
  9.     For Each Rng In x.[B2].Resize(x.[B2].End(xlDown).Row - 1, 1)
  10.         For i = cnt To 2 Step -1
  11.             Set y = Sheets(i)
  12.             y.Activate
  13.             Set FindCell = y.Cells.Find(What:=Rng.Value, After:=ActiveCell, _
  14.                     LookIn:=xlFormulas, LookAt:=xlPart, _
  15.                     SearchOrder:=xlByRows, SearchDirection:=xlNext, _
  16.                     MatchCase:=False, MatchByte:=False, SearchFormat:=False)
  17.             If Not FindCell Is Nothing Then
  18.                Rng.Offset(0, -1) = FindCell.Offset(0, -1)
  19.                Rng.Offset(0, 1) = FindCell.Offset(0, 1)
  20.                Exit For
  21.             End If
  22.         Next
  23.     Next
  24. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD