Sum a column

S

Stefanie

Col A Result of Formula
1 0 0
2 7.5 7.5
3 0 0
4 0 0
5 9 9
6 9.5 18.5
7 10 28.5
8 0 0

This is a partial list of a driver log sheet. Column A is hours driven each
day. I'm trying to create a formula that will sum the numbers in column A
backward, or up, to where the previous number is zero and then stop. I was
thinking an IF stmt, but I'm stuck on how to sum upward and then stop when
the cell value is 0.

example: IF(A1=0,"0",sum upward until Ax=0). I don't know what to do for
"sum upward until Ax=0" or if its even possible.

Thanks,
Stefanie
 
E

Elkar

For Cell B1, you'd just use =A1. Then try this, starting with Cell B2:

=IF(A2=0,0,B1+A2)

Copy down as needed.

HTH
Elkar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top