Selecting Rows

  • Thread starter Thread starter Coolboy55
  • Start date Start date
C

Coolboy55

I want to select rows 3 to l_LastRow. I can't say Rows("3:l_LastRow"),
so what are my alternatives? Thanks!

This is what I have:
 
Did you mean want to select a row three row after the last row?

Sheets("Sheet4").Rows(lngLastRow + 3).Select
 
I want to select rows 3 to lngLastRow (in this case, lngLastRow = 203).
But the value of lngLastRow may change in the future as items in the
table I'm creating are modified.
 
I also will want to use xlLastCell to pick a range, as in,
Range("B3:xlLastCell"). How can I do that?

I'm basically creating a table for my data, along with background
shading. The data in the table will change occasionally, so the
borders and shading will need to be reapplied and resized as
necessary.

Am I doing it wrong?
 
So you want to select the range from B3 to the last cell? I think you
can try this syntax.

Range(Cells(3, "B"), Cells.SpecialCells(xlCellTypeLastCell)).Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top