View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Blank cells & formula cells

Switch to Match from lookup...

Sub test()
MsgBox (Application.WorksheetFunction.Match(9.999E+307, Columns("A")))
End Sub
--
HTH...

Jim Thomlinson


"Otto Moehrbach" wrote:

Thanks for responding. Your solution is good for finding the value of the
last cell that has a value, but I am looking to find that cell, not its
value. Thanks again. Otto
"Gary''s Student" wrote in message
...
Very similar to the expression in the worksheet:

Sub ordinate()
Set r = Range("A1:A20")
MsgBox (Application.WorksheetFunction.Lookup(9.9999999999 9999E+307, r))
End Sub

will output the value of the last non-blank numeric cell in A1 thru A20
--
Gary''s Student - gsnu200764


"Otto Moehrbach" wrote:

Excel XP & Win XP
Say I have a column of 20 contiguous cells.
All 20 cells have formulas.
The top X number of cells have values, by formulas.
The rest of the cells have blanks, by formulas.
Short of looping up the column looking for (NOT ""), is there a
better/quicker way of finding the last value cell?
Thanks for your time. Otto