What VBA code should be used to provide a range that always includes the latest nine rows of data?
I have a data table with 9 subjects that is manually updated each month. I want to duplicate some cell values from the most recent entries and use them to fill out a scorecard on another worksheet.
Determining a dynamic range from the ninth row up is something I can't seem to figure out how to do.
I can define the last row using
Last = Cells(Rows.Count, “B”).End(xlUp).Row
But how do I define the last 9 rows?
Last = Cells(Rows.Count, “B”).End(xlUp).Row
‘First???
For i=Last To ‘first Step -1
‘If “name” then copy cell values to the defined cell in the scorecard