View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Variable Sum Function

David G. wrote:
Hi! Is there a formula that provides the following?:

I have two sequential totals, say 35, & 49. In the example below I want
column B to sum column A until it reaches condition 1 (35). That would be
B2. I then want B3 to (a)begin sum at A3 & (b)add the difference of
condition 1 minus B2. In B5 the sequence will repeat.

The trick is A1 is variable, that is, A2 could have 15, meaing that the
condition 1 will be met on B3 or another subsequent cell. I want this to
roll as the data is entered in A.

I hope this isn't oo confusing :-)

A B
1 15 15
2 32 47
3 10 22
4 25 47
5 4 6
6 13 19


Perhaps on rows 2 and fill down is

=B1+A2-35*(--B135)

Though I get different results in B5 and B6 (typo in your example?)