The code below select all cells in the LastRow only , from Column "D" to Column "AH".
Sub My_Script()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "D").End(xlUp).Row
.Range(.Range("D" & LastRow), .Range("AH" & LastRow)).Select
End With
End Sub
If you wanted to select all rows (from row 1 to LastRow), from Column "D" to Column "AH".
Sub My_Script()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "D").End(xlUp).Row
.Range(.Range("D1"), .Range("AH" & LastRow)).Select
End With
End Sub
Note: not sure why you want to Select this range ? You can set this Range to a variable of type Range, and later to Copy or whatever you want to do with it. There's hardly a reason to ever use Select.