View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Minitman[_4_] Minitman[_4_] is offline
external usenet poster
 
Posts: 273
Default Selecting The Last Row

Hey David,

Good point and a fact that I forgot to mention, there may or may not
be data in the cells in column A. There will always be data in the
cells of either column A or B or both. If there is no data in the
cells of either column then that row is blank.

I hope this explains the situation a little better.

-Minitman


On Wed, 20 Jul 2005 10:40:19 -0500, davidm
wrote:


Bob,

Could you please explain how the formula

LastRow = MyRng.Find("*", .Cells(1), xlFormulas, _
xlWhole, xlByRows, xlPrevious).Row

tracks the last row? On the face of it, I would intuitively interprete
it to be "Move down the column starting from 1st cell, checking through
formulas and whole values row-by-row for as long as data is found; stop
if data is not found". But upon testing, this representation flies in
the face of the (correct)results. For instance where there are blanks
in the column, the formula skips these blanks and rightly locate the
last cell in column. Again, it does not really need "formulas" to be in
the range!

Just curious.