title: Macro to paste in dynamic range
body: <p>I need to copy data table from one workbook into another. I figured out how to set the Copying range, but am struggling with a destination range which is dynamic.</p>
  
  <p>For better understanding; Copying Document includes a set of values ordered by dates. Sometimes the data set will start with 1-jan, sometimes with 5-oct or any other random date.</p>
  
  <p>Destination Document is a table of fixed dates from 1-jan until 31-dec and the data needs to be pasted in the correct row (according to the matching date). The columns are fixed.</p>
  
  <p>I have a MATCH formula in the Destination Document to crosscheck in which row the Paste Range should start, but don't know how to combine it with the already known column.</p>
  
  <p>For now I have:</p>
  
  <pre><code>Dim x As Workbook
  Dim y As Workbook
  
  Set x = Workbooks.Open("PATHWAY 1")
  Set y = ThisWorkbook
  
  x.Sheets("2").Range("B1:F1").End(xlDown).Copy
  
  'Now, paste to y worksheet:
  y.Sheets("R2").Range.Cells("2,[Helper.xlsb]R2!$H$2").PasteSpecial xlPasteValues
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QvWoN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QvWoN.jpg" alt="Data Sets Screenshot"></a></p>