Sum a Row Starting with First non Zero Value

  • Thread starter Thread starter rca
  • Start date Start date
R

rca

I am trying to determine how to write a formula to sum the part of a ro
starting with the cell to the right of the last non zero value, whil
ignoring all numbers to the left of the last zero. Hope that make
sense.

Maybe an example will make it clear as mud. I've attached
spreadsheet with the total column computed like I would like th
formula to calculate.

Basically I want the Total formula to only sum starting with the firs
cell to the right of the last non-zero cell
 
In N2 enter:

=SUM(INDEX(B2:M2,MATCH(9.99999999999999E+307,IF((ERROR.TYPE(1/B2:M2)=2)*ISNU
MBER(B2:M2),1))):M2)

Commit this with control+shift+enter instead of just enter then copy down.
 
Could you explain why that works? I'd like to have a bette
understanding of the solution.

Thanks
 
Back
Top