View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Ben McClave Ben McClave is offline
external usenet poster
 
Posts: 173
Default Function to find last value in a column

Sybolt,

As I understand it, the division piece will return an array of values that includes one of two results:

1/TRUE = 1/1 = 1 and
1/FALSE = 1/0 = #DIV/0!

So any cell with contents will return a value of 1 and any empty cells will return an error. For example, an array of 5 cells in which the first 3 contain values and the last 2 are blank would look like this:

(1,1,1,#DIV/0!,#DIV/0!)

Since "2" is not present in the array (it can't be by definition), the LOOKUP function will return the last item in the array that is less than the LOOKUP value (in this case, the third item).

Ben