-
LastRow from a specific Cell
Hi,
I want to find the last cell used from a particular cell. THe current code I have is
lastrow = cells(rows.count, "C").End(xlUp).Row
But what if I want it starts counting the last row used as from cell C35 ? How should the code be ?
Thank you,
Kind regards,
Christophe
-
It is the same, essentially. Of course if C35 and below are empty, then lastrow will be < 35. You can check for that. Of course that just means last cell with a value in Column C.
-
Hi Kenneth,
Thank you for your answer. Issue here is that the start of my list if at C35 but another list starts at C60. Any way I could count the filled-in cells as from C35 ?
-
Is this a ListObject table or just data?
While the usually approach is to start from the actual last cell in a column, and go up until a value is found, one can start from a cell and go down. That only works if there are not blank entries. If you know your data, that method will suffice in some cases. I would check that it did not return a row in the next "list" though.
What you may want to do is to start from the first cell in the next "list" and then go up from there. That will take care of the empty cell issue.
-
Ok So I just write lastrow = cells(rows.count, "C59").End(xlUp).Row and it should go get the last active cell starting from C35 ?
-
Found it ! It's just cells(59, "C").End(xlUp).Row
Thanks a lot !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules