
Originally Posted by
contra76
How does LR function find the number of rows exactly? i've never seen this code before. i have like 20 columns, many with blank cells (including the one that we're referencing), so I fear it will miss some. One column (column J) will always have the full cells/true number of rows though.
The LR variable is searching from all the cells from the bottom of the worksheet upward until it finds a cell with anything in it, then storing that row in the LR.
I also notice that you don't use the LR function again after you define it in the beginning. right?
The LR was supposed to appear in a couple of lines of code after that, but missed the first posting, don't know how I managed that. Here's the corrected code along with a different copy/paste/delete from old sheet method that shouldn't include any of the hidden rows.
Bookmarks