Display the last non-zero value in a list of numbers

G

Guest

I am trying to find the last entered value in a list of basic weight data. I
enter new numeric values to the list on a daily basis, but would like to
always show the last entered value in another cell also. The list also
contains zero values, that I want to exclude or ignore from my result, e.g.

0
300
250
350
375
0
0

would always return 375, as the last value in the list (which will also
always be positive) it's also the VALUE I need, not the position in the list.

Regards,

IvanM
 
R

Ron Rosenfeld

I am trying to find the last entered value in a list of basic weight data. I
enter new numeric values to the list on a daily basis, but would like to
always show the last entered value in another cell also. The list also
contains zero values, that I want to exclude or ignore from my result, e.g.

0
300
250
350
375
0
0

would always return 375, as the last value in the list (which will also
always be positive) it's also the VALUE I need, not the position in the list.

Regards,

IvanM

Something like:

=LOOKUP(2,1/(-A1:A1000<>0),A1:A1000)

should work.


--ron
 
B

Bob Phillips

=LOOKUP(2,1/(A1:A1000<>0),A1:A1000)

works for me

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
R

Ron Rosenfeld

=LOOKUP(2,1/(A1:A1000<>0),A1:A1000)

works for me

Yes, of course. <sound of slap to forehead>

Actually,

=LOOKUP(2,1/(A1:A1000),A1:A1000)

should work also, for non-zero numeric values.


--ron
 
B

Bob Phillips

Actually, that is what I meant, I don't know why I copied the <>0 (slap for
me too <g>)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top