I am using the following to get the last row of a column:
lastRowClass2 = ActiveSheet.Range("D" & Rows.Count).End(xlUp).Row
I want to modify this a bit and find the last row only in a particular range such as D1:D20. I do not want to consider values that are beyond row 20.
How can I do that?