• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

selecting all the rows till the end of the worksheet

zohaib

Member
Hello,

ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Range(Selection, Selection.End(xlDown)).Select

The above formula selects the whole row and then selects everything down till it reaches blanks.

The problem is my data has blanks in it so it is not selecting everything so one method I used to correct this is repeat steps like below.

ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select

My questions is how do I modify this formula to select everything down? I was trying something like this but of course I am doing something wrong and it is not working.

ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Range(Selection, Selection & Rows.Count).Select

Can someone help me correct this formula?

Thanks,
Zohaib
 
Hi Zohaib,

Try below
Code:
l_row = Cells(Rows.Count, ActiveCell.Column).End(xlUp).Row

Range(Range(ActiveCell.Offset(1, 0).Address), Cells(l_row, ActiveCell.Column).Address).Select
 
Back
Top