I am trying to have the cell in column I look at column G. If that cell has a 0 I want to sum the number above up stopping at the next zero above. For instance cell G 7 has a zero. I7 needs to sum G2:G6. I have this somewhat working but the sum is appearing in cell I1. The sum is i7 is actually summing G8:G9 this is correct but that sum needs to be in I10. Basically its putting the sum above rather than below.
=IF(G7=0,SUM(INDIRECT("G"&ROW()+1&":G"&IFERROR(MATCH(0,INDIRECT("G"&ROW()+1&":G"&ROW()+100),0)+ROW()-1,ROW()+100))),"0")
=IF(G7=0,SUM(INDIRECT("G"&ROW()+1&":G"&IFERROR(MATCH(0,INDIRECT("G"&ROW()+1&":G"&ROW()+100),0)+ROW()-1,ROW()+100))),"0")