title: Excel VBA macro to copy rows that meet a criteria to a new row on another sheet
body: <p>I am struggling with my code- and will admit that I am a newbie to VBA. 
  Yes- I have reviewed a ton of posts and dont seem to be able to fix my code!</p>
  
  <p>I am trying to extract rows that meet a specific value ('Priority')- which is located in column H across 15 sheets. The code needs to extract any rows that meet the criteria from all of the 15 sheets. The extracted row is to be pasted into the front sheet "FootpathStrategyTool"- starting at cell A20 (below the predefined headers).
  I am having difficulty getting the loop to paste the copied row into the next blank row. The code runs, but seems to miss the first few worksheets. It may have something to do with my final row line. 
  If anyone can help I would be extremely grateful!!!!</p>
  
  <pre><code>Sub getdata()
      '1. what is the priority value you wish to search for?
      '2. define lastrow for the sheets
      '3. Find records that match priority value and paste them into the main sheet
  
  Dim Priority As Integer
  Dim Worksheet As Worksheet
  
  Priority = Sheets("FootpathStrategyTool").Range("I10").Value
  
  ' Find the final row of data for all sheets
  
  For Each Worksheet In ActiveWorkbook.Worksheets
  Worksheet.Select
  finalrow = Cells(Rows.Count, 1).End(xlUp).Row
  
  Dim NextRow As Range
  Set NextRow = Sheets("FootpathStrategyTool").Cells(Cells.Rows.Count, 
  1).End(xlUp).Offset(1, 0)
  
  ' Loop through each row
  For x = 4 To finalrow
      ' Decide if to copy based on column H Priority
      ThisValue = Cells(x, 8).Value
      If ThisValue = Priority Then
          Cells(x, 1).Resize(1, 33).Copy
          Sheets("FootpathStrategyTool").Select
          NextRow = Cells(“A” &amp; Rows.Count).End(xlUp).Row + 19
          Cells(NextRow, 1).Select
  
      End If
      ' Step down 1 row from present location.
              ActiveCell.Offset(1, 0).Select
              ActiveSheet.Paste
              Sheets("FootpathStrategyTool").Select
   Next x
  
  Next Worksheet
  
  
  End Sub
  </code></pre>