The following code gives me an error of Block Variable not set but I don't recognize the problem.
Any help would be appreciated
Sub my_range()
Dim my_range As Range
Dim Last_row As Long
Last_row = Sheets("DATA").Range("B" & Rows.Count).End(xlUp).Row
my_range = Sheets("DATA").Range("B5" & ":F" & Last_row)
Range(my_range).Select
End Sub
Any help would be appreciated
Sub my_range()
Dim my_range As Range
Dim Last_row As Long
Last_row = Sheets("DATA").Range("B" & Rows.Count).End(xlUp).Row
my_range = Sheets("DATA").Range("B5" & ":F" & Last_row)
Range(my_range).Select
End Sub