Last value

  • Thread starter Thread starter RedViking
  • Start date Start date
R

RedViking

Hi,
I am looking for a function that will give me the last value >0 in
column of data where the number of rows differs and the first entrie
may or may not be 0. Two examples:

A1: 0
A2: 3
A3: 5
A4: 7
A5: 0

In this case I want 7 (cell A4) to be given by the function.

A1: 1
A2: 3
A3: 5
A4: 6
A5: 8
A6: 10
A7: 0

In this case I want 10 (cell A6) to be given by the function.

I've tried =INDEX(A1:A7;COUNT(A1:A7)), but this will not work if th
first rows contain 0.

RedVikin
 
=INDEX(A1:A7,MAX(IF(A1:A7>0,ROW(A1:A7))))

Array-entered, meaning press <ctrl><shift><enter>.

HTH
Jason
Atlanta, GA
 
Hi,

Another way...

=LOOKUP(9.999999999E+307,IF(A1:A10>0,A1:A10))

entered using CTRL+SHIFT+ENTER
 
Back
Top