View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Concise Way To Select All Rows Except First?

Option 3 is probably the best one to use when a user does not know the
parameters of their used range. Option 1 is OK if you are only working on a
specific column as your criteria range. Option 2 is scary since the used
range could begin in row 10 (or any row other than 1) and the integer
returned would be that many rows short of the actual last row.


"Mike H" wrote in message
...
Hi,

here's a few ways

Lastrow1 = Cells(Cells.Rows.Count, "A").End(xlUp).Row

Lastrow2 = ActiveSheet.UsedRange.Rows.Count

LastRow3 = Cells.Find("*", SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row

Mike

"PeteCresswell" wrote:

I guess I want to concoct a .Range and then operate on it.

But, short of iterating thorugh rows to find the last row, I can't
figure out how to do it.

Googled a little, and "ActiveCell.SpecialCells(xlLastCell) seems to
have the right ring to it.

True?

Either way, can somebody shed some light?