I'm looking to select every cell below a certain cell (not only in my list). I know of xldown, but this doesn't work in the instance of blanks, which occur in my list.
Is this possible?
I'm looking to select every cell below a certain cell (not only in my list). I know of xldown, but this doesn't work in the instance of blanks, which occur in my list.
Is this possible?
The follow will select all cells from A1 down to the last cell in column A that's not empty:
Sub select_all()
Range(Cells(1, 1), Cells(Range("A1000000").End(xlUp).Row, 1)).Select
End Sub
You can modify the column / range to fit in your situation. Noted that it is hardcoded to assume 1000000 or less rows being used.
This will select A9 to column A the last row with data:
Range("A9:A" & range("A" & rows.Count).End(xlUp).Row).select
Just change A and 9 to whatever column and row you want.
I am interested to know what your next line of code is though as .select can most probably be ommited and the command can be performed directly without a select.