Excel Ninja In Training
New Member
- Joined
- May 6, 2011
- Messages
- 25
The VBA line:
Range(Cells(Application.ActiveCell.SpecialCells(xlLastCell).Row, "E").Address).Select
works perfectly, selecting the cell in the "E" column of the last row in the worksheet with data in it.
So why doesn't the following select the range from E2 to that cell?
Range("E2:Cells(Application.ActiveCell.SpecialCells(xlLastCell).Row, "E").Address").Select
When I try it, I get a syntax error. I must be missing something blindingly obvious.
Range(Cells(Application.ActiveCell.SpecialCells(xlLastCell).Row, "E").Address).Select
works perfectly, selecting the cell in the "E" column of the last row in the worksheet with data in it.
So why doesn't the following select the range from E2 to that cell?
Range("E2:Cells(Application.ActiveCell.SpecialCells(xlLastCell).Row, "E").Address").Select
When I try it, I get a syntax error. I must be missing something blindingly obvious.