Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark,
I missed that you wanted the value rather than the range! MyValue = Cells(Rows.Count, "D").End(xlUp).Value --- Regards, Norman "Norman Jones" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Mark, Norman's solution is the standard fare but to follow through on your attempt, you could go: Sub mm() x = Application.Lookup(9.999999E+30, [d:d]) msgbox x End sub -- davidm ------------------------------------------------------------------------ davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645 View this thread: http://www.excelforum.com/showthread...hreadid=506981 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reference Column of Named Cell vba | Excel Discussion (Misc queries) | |||
Reference the last cell in a column | Excel Worksheet Functions | |||
reference a cell by using a returned value as the row or column nu | Excel Worksheet Functions | |||
Extract Column Letter from Cell Reference in another Cell | Excel Discussion (Misc queries) | |||
How do I reference every "n" cell in a column in Excel? | Excel Worksheet Functions |