Worksheet Vba Last Row. If writing the code is the first progress you made in VBA, then making the code dynamic is the next step for you. Before I explain to you the code, I want you to remember how you go to the last row in the normal worksheet.
I know how to find the last row of my worksheet that has any type of data or values. Or, you can modify the "DoesItWork" sub, so it will find the last row on a worksheet. To access the last sheet of the workbook, use of this command: Sheets(Sheets.
Before I explain to you the code, I want you to remember how you go to the last row in the normal worksheet.
Row 'Last row in your main sheet 'change the sheet name as per your needs.
Update: A potential loophole was pointed out by @Jeeped for a a named range with non-contiguous rows as it generates unexpected result. If writing the code is the first progress you made in VBA, then making the code dynamic is the next step for you. Difference between Worksheets and Sheets in VBA.