View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default how to reference last cell value in a column?

Hi Mark,

Try

Dim Rng as Range

Set Rng = Cells(Rows.Count, "D").End(xlUp)


---
Regards,
Norman



"Mark Dvorkin" wrote in message
...
within a function I need to reference the value of last non empty cell.
Usually I have contiguous range of cells, but sometimes there might
be empty cells.
Basically I need an equivalent of
LOOKUP(9.99999999999999+307,D:D)
say for column D

Thanks in advance for any help,
/mark