Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What's a better way to capture the range of Columns I:Q down to last row the with an entry.
I don't know which column will have the longest list of data. I use select here just to verify the range on the sheet, I will set the range to a range object when I find the better way. I understand xlCellTypeLastCell is only reduced by deleting the cells. The range may be 1400 rows or only 11 as an example. When it is only 11, I don't want my Find code to have to search all the wasted unused range. Thanks, Howard Sub aMethod() Dim WS As Worksheet Dim LastCell As Range Dim lcCel As Long Set LastCell = Range("I:Q").SpecialCells(xlCellTypeLastCell) lcCel = LastCell.Row Range(Cells(3, 9), Cells(lcCel, 17)).Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA variable definition help needed. | New Users to Excel | |||
Boolean Variable Definition | Excel Programming | |||
Excel question with variable definition | Excel Programming | |||
[variable] definition | Excel Programming | |||
variable range definition | Excel Programming |