title: Find last row in range
body: <p>I'm having a little trouble with finding the last row.</p>
  <p>What I am trying to do is find the last row in column &quot;A&quot;, then use that to find the last row within a range.</p>
  <p>Example of Data:</p>
  <p><a href="https://i.stack.imgur.com/y6epV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y6epV.png" alt="Example of data" /></a></p>
  <pre><code> 1) LR_wbSelect = wbshtSelect.cells(Rows.count, &quot;A&quot;).End(xlUp).Row - 22
  
   2) LR_wbSelectNew = wbshtSelect.cells(LR_wbSelect, &quot;A&quot;).End(xlUp).Row
  </code></pre>
  <p>I am using the last row in column &quot;A&quot; as the data from row 29 down will always be the same length, the rows used in column &quot;B&quot; from row 29 can be a varying number of rows.</p>
  <p>So I am trying to use <code>LR_wbSelect</code> in column &quot;A&quot; to get my starting last Row, then within <code>LR_wbSelectNew</code> using it as the starting point to look up from.</p>
  <p>This works when the column I set to &quot;A&quot;, <code>LR_wbSelectNew</code> gives me the row of &quot;17&quot;, but when I change the column in <code>LR_wbSelectNew</code> to &quot;B&quot; it doesn't give the correct last row of &quot;18&quot;.</p>
  <p>I can change the column to &quot;C, D, E, F&quot; and the code works fine, but the only column that I can use is &quot;B&quot; because it will always have data in it, where the rest of that row could have a blank cell.</p>
  <p><strong>After doing some testing on the sheet, by pressing CRTL &amp; Up from the lastring point of <code>LR_wbSelect</code> column &quot;B&quot; ignores the data in the rows and go to the row where it find data. I can't see a reason why Excel doesn't think there is data in these cells?</strong></p>