title: excel macro to find and copy a block from one workbook to matching value in another workbook starting in the same row (using offset and resize)
body: <p>I think I've almost got it what I'm trying to do is update a clients report file from my workbook for each shift. 
  The report is set up with a column with a date/time format (every 2 hours) for each quarter (i.e. "05/05/16 14:00" "05/05/16 16:00" ect).
  I have set up my workbook with formulas to report the data in the same format.</p>
  
  <p><a href="http://i.stack.imgur.com/JhZTg.png" rel="nofollow">report</a></p>
  
  <p>So what I need it to do is </p>
  
  <ol>
  <li>open the report file </li>
  <li>select the data in e18 (cell I've highlighted with red box)</li>
  <li>find the cell in the report file</li>
  <li>copy the block data with the purple box </li>
  <li>paste(values) to matching location based on found data</li>
  </ol>
  
  <p>here is the code I have so far it's finding the data but pasting it in the first row instead of the matching row. 
  I'm new to VBA so its most likely something simple I didn't understand.</p>
  
  <pre><code>Sub ONGOING()
  
  Dim rFndCell As Range
  Dim strData As String
  Dim stFnd As String
  Dim fCol As Integer
  Dim sh As Worksheet
  Dim ws As Worksheet
  
  Set ws = ThisWorkbook.Sheets("REPORTING")
  Set sh = Workbooks.Open("F:\report.xlsm").Worksheets("Production data")
  stFnd = ws.Range("E18").Value
  
  With sh
      Set rFndCell = .Range("A:IV").Find(stFnd, LookIn:=xlValues)
      If Not rFndCell Is Nothing Then
          fCol = rFndCell.Column
          ws.Range("G18:N24").Copy
          sh.Cells(6, fCol).Offset(, 2).Resize(7, 8).PasteSpecial xlPasteValues
      Else 'Can't find the item
          MsgBox "Not Found"
      End If
  End With
  </code></pre>
  
  <p>End Sub</p>
  
  <p>Thanks</p>