title: Copy a cell from one sheet to another sheet if that cell contains a particular text
body: <p>I have compiled wheel data but want a VBA macro that copies any cell from sheet 1 (named: SheetSJ) that matches partial text, and then copies that cell's data into sheet 2. This is to make the data much easier to work with.</p>
  
  <ol>
  <li>Search each row for any cells in SheetJS that contain text "Product ID", if no matches then ignore</li>
  <li>If any cell (text) matches, copy that cell, and paste the contents to sheet 2 column B (beginning with row 2)</li>
  <li>Search each row for any cells in SheetJS that contain text "Bolt Pattern", if no matches then ignore</li>
  <li>If any cell (text) matches, copy that cell, and paste the contents to sheet 2 column D (beginning with row 2)</li>
  </ol>
  
  <p>Wheel Data
  <a href="https://i.stack.imgur.com/R7DTt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R7DTt.jpg" alt="enter image description here"></a></p>
  
  <p>As evident in the picture, the data is all over the place in each column and thus the macro cannot use any particular cell for reference. It can only match text values (which are unique).  </p>
  
  <pre><code>Sub Test()
  For Each Cell In Sheets(1).Range("A1:ZZ200")
      If Cell.Value = "Product ID" Then
          matchRow = Cell.Row
          Rows(matchRow &amp; ":" &amp; matchRow).Select
          Selection.Copy
  
          Sheets("Sheet2").Select
          ActiveSheet.Rows(matchRow).Select
          ActiveSheet.Paste
          Sheets("Sheet1").Select
      End If
  Next
  End Sub
  </code></pre>
  
  <p>I managed to find some examples online but they copy the entire row not the individual cell.</p>