View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
[email protected] abhijeetgaddam@gmail.com is offline
external usenet poster
 
Posts: 1
Default Function to find last value in a column

On Thursday, December 6, 2012 7:26:53 PM UTC+5:30, Ben McClave wrote:
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




On Thursday, December 6, 2012 7:26:53 PM UTC+5:30, Ben McClave wrote:
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


check this link you will get ans for sure.

http://www.xl-central.com/lookup-last-instance.html