Question : Find last row and then go up BUT NOT USing USEDRANGE

I have an area of an excel workbook that always starts at A1:D??.  that is, it starts with Cell A1, extends to D but the row numbers can change.  There is a total in the D column, but I need to go up one from this field.  I figures I can start at cells D9, do an End(xlDown) and then up one.  But how to I tell the code to go up one from the last row?  This range A1:D?? will become my named range dyanmcially.  The number of rows changes every month.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Public Sub CountryRange()
'Starts at A1:D?? and then up one row
Dim intLastRow As Integer, rngRow As Range
Dim rngAddress As Range, rngStart

    Range("D9").Select
    Selection.End(xlDown).Select
   
    Range("D31").Select


Set rngStart = Range("D9")
    With rngStart.Select
        Selection.End(xlDown).Select
    End With
    
Debug.Print

End Sub

Answer : Find last row and then go up BUT NOT USing USEDRANGE

dim rng as range

set rng=range(cells(9,"D"),cells(rows.count,"D").end(xlup).offset(-1,0))

should do it
Random Solutions  
 
programming4us programming4us