title: VBA for searching string in a column and copy entire rows depending on the presence of certain string at adjacent cell
body: <p>I am completely new for VBA.
  I have excel data sheet containing numbers and strings. I want to search for certain string say 'CYP' in column I then look for a cell of its row at column C and copy entire rows containing the string of cell C. I want to paste in sheet 2 of the same workbook and loop it again to look for remaining CYPs in column.</p>
  
  <p>Would you help me on this please?</p>
  
  <p>After the suggestion from pnuts, here is my macro code</p>
  
  <pre><code>Sub Macro1()
  '
  ' Macro1 Macro
  '
  
  '
      Columns("I:I").Select
      Range("I729").Activate
      Selection.Find(What:="cyp", After:=ActiveCell, LookIn:=xlValues, LookAt _
          :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
          False, SearchFormat:=False).Activate
      ActiveWindow.SmallScroll Down:=5
      Range("C749").Select
      Selection.Copy
      Columns("C:C").Select
      Range("C734").Activate
      Selection.Find(What:="EPT001TT0601C000151", After:=ActiveCell, LookIn:= _
          xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext _
          , MatchCase:=False, SearchFormat:=False).Activate
      Rows("746:750").Select
      Application.CutCopyMode = False
      Selection.Copy
      Sheets("Sheet2").Select
      ActiveSheet.Paste
  End Sub
  </code></pre>
  
  <p>In this code the CYP was found in I749, cell C749 was copied as string and first row in column C containing the same string was searched followed by copying of the entire row and 4 more followed by it then pasting in sheet2 of the same workbook.
  What I wanted was to loop this action again and again upto the end of column I and repeat the same action.</p>
  
  <p>Thank you!</p>