I would like to be able to sum column O, from bottom to top, if the last value in the column is non zero, working up to the first zero column
In my attached example, I just want to sum cells O6 and O5.
If O6 was zero, then I want the sum value zero.
Solved.
my original coding for the Gas OB cells was
=IF(LEN(K6)<>0,IF(U5=“Y”,SUMIFS(gascredit,doi,">="&K5,doi,"<="&L5)-SUMIFS(gascost,doi,">="&K5,doi,"<="&L5)),"")
I altered this to
=IF(LEN(K6)<>0,IF(U5=“Y”,SUMIFS(gascredit,doi,">="&K5,doi,"<="&L5)-SUMIFS(gascost,doi,">="&K5,doi,"<="&L5)+IF(O5<>0,O5)),"")
Works a treat