How do you handle it when you get to a 0?
If the values are in say A1 down, then in B2 enter:
=IF(A2=0,0,A2-LOOKUP(2,1/(A$1:A1<>0),A$1:A1))
this will put a 0 if the cell is 0, but will subtract last non-zero value when you are not at a 0 in the list.
Bookmarks