title: Copy/Paste results
body: <p>I got the following code, which is supposed to </p>
  
  <p>1) Search for my word, copy and paste the entire row that contains the word into new sheet</p>
  
  <p>2) Search for a word after the 1st, then copy and paste that entire row beside the contents of 1) in the new sheet.</p>
  
  <p>Could someone take a look, I am having trouble actually getting the results, there is no error I am getting. So I assume it is the whole copy and paste to my new sheet name. However i am not 100% sure.</p>
  
  <pre><code>Sub stack()
  
      Dim OSheet As String
      Dim NSheet As String
      Dim i As Integer
      Dim LRow As Integer
      Dim NSLRow As Integer
  
      OSheet = "Sheet1" 'Old Sheet Name
      NSheet = "Sheet7" 'New Sheet Name
  
      LRow = Sheets(OSheet).Cells(Rows.Count, 1).End(xlUp).Row 'Last Row in Old Sheet
  
      Sheets(OSheet).Activate
  
      For i = 2 To LRow
           'Finds last row in the New Sheet
          If Sheets(NSheet).Cells(2, 1) = "" Then
              NSLRow = 1
          Else
              NSLRow = Sheets(NSheet).Cells(Rows.Count, 1).End(xlUp).Row
          End If
  
           'If cell has "First Name then..."
        Dim StrX As String
      If InStr(LCase(Cells(i, 1)), LCase("stack:")) Then
          StrX = Range(Cells(NSLRow + 1, 1), Cells(NSLRow + 1, 6)).Address
          Sheets(NSheet).Range(StrX).Value = Range(StrX).Value
      ElseIf InStr(LCase(Cells(i, 1)), LCase("overflow:")) Then
          StrX = Range(Cells(NSLRow + 1, 7), Cells(NSLRow + 1, 8)).Address
          Sheets(NSheet).Range(StrX).Value = Range(StrX).Value
      End If
      Next i
  
  End Sub
  </code></pre>
  
  <p>EDIT, Expected result:</p>
  
  <p>!<a href="http://i.imgur.com/69elWuB.jpg" rel="nofollow">http://i.imgur.com/69elWuB.jpg</a></p>
  
  <p>EDIT, updated code with some fixes you guys mentioned.</p>
  
  <pre><code>Sub stackv2()
       'added Sheets(OSheets)to Range Cells
      Dim OSheet As String
      Dim NSheet As String
      Dim i As Integer
      Dim LRow As Integer
      Dim NSLRow As Integer
  
      OSheet = "Sheet1" 'Old Sheet Name
      NSheet = "Sheet7" 'New Sheet Name
  
      LRow = Sheets(OSheet).Cells(Rows.Count, 1).End(xlUp).Row 'Last Row in Old Sheet
  
      Sheets(OSheet).Activate
  
      For i = 2 To LRow
           'Finds last row in the New Sheet
          If Sheets(NSheet).Cells(2, 1) = "" Then
              NSLRow = 1
          Else
              NSLRow = Sheets(NSheet).Cells(Rows.Count, 1).End(xlUp).Row
          End If
  
           'If cell has "First Name then..."
        Dim StrX As String
      If InStr(LCase(Cells(i, 1)), LCase("first name")) Then
          StrX = Sheets(OSheet).Range(Sheets(OSheet).Cells(NSLRow + 1, 1), Sheets(OSheet).Cells(NSLRow + 1, 6)).Address
          Sheets(NSheet).Range(StrX).Value = Range(StrX).Value
      ElseIf InStr(LCase(Cells(i, 1)), LCase("last name")) Then
          StrX = Sheets(OSheet).Range(Sheets(OSheet).Cells(NSLRow + 1, 7), Sheets(OSheet).Cells(NSLRow + 1, 8)).Address
          Sheets(NSheet).Range(StrX).Value = Range(StrX).Value
      End If
      Next i
  
  End Sub
  </code></pre>