Thread: Last Row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Last Row

Here's the code that I got off of someone else for find the last row in
a given column.

LastRow = Columns("A").Find(What:="*", After:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row

Die_Another_Day
bodhisatvaofboogie wrote:
Columns("A").SpecialCells(xlBlanks).Offset(-1).Select


This formula finds all the blank spaces then moves up one and selects the
cells. The problem is that it selects all the way to the bottom of Excel,
line 65000 SO, how do I get it to just select to the last row in the
dataset??? THANKS!!!