Subtract the first value from (down to up) when the value > “0”

Dear Excel experts,

How I can tell excel to “subtract” the first value from (down to up) when the value > “0”
For more details please find the attached excel

Thanks for support

AttachmentSize
help.xlsx10.24 KB
Vishesh's picture

This formula should do Put

This formula should do

Put this in D2
=IF(A2=0,0, A2-MAX($A$1:A1))

Thanks Vishesh it's

Thanks Vishesh it's working

thanks for your great help