# Excel 2007 : Sum Up From - Until

1. ## Sum Up From - Until

If any cell in the B column has the text "ShiftEnd", then I need to have a subtotal in the corresponding cell up till we encounter another "ShiftEnd". My data goes as follows:

A B C
Mins ShiftStatus Subtotal
217
19
58
44 ShiftEnd =Sum(A2 to ShiftEnded)
338
134
21
15
24
114 ShiftEnd =Sum(A6 to ShiftEnded)
51
166
82
19 ShiftEnd =Sum(A11 to ShiftEnded)
143 ShiftEnd =Sum(A15 to ShiftEnded)

Thanks so much!
Sandy

2. ## Re: Sum Up From - Until

``Please Login or Register  to view this content.``
I think your row numbers are off a little at the end there, but that's ok.

In C2 enter this formula and copy down:
=IF(B2="ShiftEnd", SUM(\$A\$1:A2) - SUM(\$C\$1:C1), "")

3. ## Re: Sum Up From - Until

You ARE a rocket scientist JB. Thanks so much, you rock!

4. ## Re: Sum Up From - Until

If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].

(Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

There are currently 1 users browsing this thread. (0 members and 1 guests)