return last cell in a row not zero

M

Maarkr

hopefully simple but im an access type... and I would like a formula, not vb
code. a price is entered each week, starting from the left, default $0 if
not filled in. I want to return the first nonzero value from the right.
After 4 weeks i t looks like:

15 25 35 25 0 0 0 0 0

I want to return 25.
 
T

T. Valko

a price is entered each week

I guess that means it's safe to assume there are no negative numbers?

Try this:

=IF(COUNTIF(A1:I1,">0"),LOOKUP(1E100,1/A1:I1,A1:I1),"no prices")

Will return the rightmost non-zero value.
 
Top