Formula to Return Last Non-Zero Value in Row

  • Thread starter Thread starter Guest
  • Start date Start date
Based on your question I'm assuming only numbers will involved, no TEXT in
the range?

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

Will return the last value that is not a zero from row 1, A1:IV1.

Biff
 
Here's a variation of Biff's formula that you can put in A1 (and copy down)
to check the rest of the row..........

=IF(MAX(B1:IV1)>0,LOOKUP(2,1/(B1:IV1<>0),B1:IV1),"")

Vaya con Dios,
Chuck, CABGx3
 
Biff,
Thanks for the solution. It works as advertised.
I am trying to undersand the logic.
Is the first "2" Boolean (i.e. "False")?
Is the first "1" Boolean (i.e. "True")?
The formula seems to work whether the "1" is a "1" or a "2."
If you have a moment, could you explain how this works?
(Always trying to improve my Excel logic skills.)
Thanks.
 
Back
Top