title: Fill down a row on VBA
body: <p>I am trying to find out how to fill down (or copy?) a row (<code>lastUsedRow</code>) up to the last row. However I find myself struggling with designating ranges (especially because I am working on different datasets that have different sizes).</p>
  
  <p><strong>Before</strong></p>
  
  <p>I need to spot the <code>lastUsedRow</code> (<code>lastUsedRow = .Range("A" &amp; .Rows.Count).End(xlUp).Row</code>) - which is row 31 here. It designates the latest row where there was data in column A.</p>
  
  <p>Then I want to tell VBA to fill down until the last row (<code>lastRow</code>) - row 39 - which can be found using <code>lastRow = .Range("E" &amp; .Rows.Count).End(xlUp).Row</code>. It designates the latest row where there was data in column E.</p>
  
  <p><a href="https://i.stack.imgur.com/VfAWw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VfAWw.png" alt="enter image description here"></a></p>
  
  <p><strong>After</strong>  </p>
  
  <p><a href="https://i.stack.imgur.com/oPuRL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oPuRL.png" alt="enter image description here"></a></p>
  
  <p><strong>Question</strong> </p>
  
  <p>VBA recommends to work with <code>Range().FillDown</code> but I struggle with designating the range when coding for changing datasets. More precisely, how to I write down a range that is between <code>lastUsedRow</code> and <code>lastRow</code>?</p>