Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 9
Default formula to stop calculating when it comes across a particular valu

I have spent hours trying to do this I now have less hair and whats left is
turning grey quickly, please help

Im trying to create a formula that sum,s up until it hits a particular value
and then stops so for example:
A B C
0 9 0
0 10 0
0 2 0
1 5 26
0 5 0
1 10 15
So in the example above I need the formula to sum up column B until it finds
a numerical value of 1 in in column A so the value 26 would show in column C
and the calculation would then start again from the next row.

Good luck understanding this and hope you help

Cheers
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default formula to stop calculating when it comes across a particular valu

To simplify the formulas, use an extra column:

In C1 enter:
=B1
In C2 enter:
=IF(A1=1,B2,C1+B2) and copy down
in D1 enter:
=IF(A1=0,0,C1) and copy down

We now see:

0 9 9 0
0 10 19 0
0 2 21 0
1 5 26 26
0 5 5 0
1 10 15 15

--
Gary''s Student - gsnu200794


"Roachy" wrote:

I have spent hours trying to do this I now have less hair and whats left is
turning grey quickly, please help

Im trying to create a formula that sum,s up until it hits a particular value
and then stops so for example:
A B C
0 9 0
0 10 0
0 2 0
1 5 26
0 5 0
1 10 15
So in the example above I need the formula to sum up column B until it finds
a numerical value of 1 in in column A so the value 26 would show in column C
and the calculation would then start again from the next row.

Good luck understanding this and hope you help

Cheers

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 9
Default formula to stop calculating when it comes across a particular

Cheers for this Gary, but the formulas below will give the outcome of 26 but
on the second one gives the outcome of (26+ the 15) 41. Is there anyway that
it can just calculate upto the last numerical 1 meaning that it shows 26 &
15, also bearing in bind that this 1 may move up and down the list?

Im not sure if this is possible but it would be really useful

Thanks again



"Gary''s Student" wrote:

To simplify the formulas, use an extra column:

In C1 enter:
=B1
In C2 enter:
=IF(A1=1,B2,C1+B2) and copy down
in D1 enter:
=IF(A1=0,0,C1) and copy down

We now see:

0 9 9 0
0 10 19 0
0 2 21 0
1 5 26 26
0 5 5 0
1 10 15 15

--
Gary''s Student - gsnu200794


"Roachy" wrote:

I have spent hours trying to do this I now have less hair and whats left is
turning grey quickly, please help

Im trying to create a formula that sum,s up until it hits a particular value
and then stops so for example:
A B C
0 9 0
0 10 0
0 2 0
1 5 26
0 5 0
1 10 15
So in the example above I need the formula to sum up column B until it finds
a numerical value of 1 in in column A so the value 26 would show in column C
and the calculation would then start again from the next row.

Good luck understanding this and hope you help

Cheers

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 52
Default formula to stop calculating when it comes across a particular

Using Gary's formulas, I get exactly the result he lists in his post - last
value is 15, not 41!
--
TedMi

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop re-calculating all cells? Eric Excel Discussion (Misc queries) 1 September 29th 07 02:58 PM
Can a cell defined by a formula become an exportable numeric valu. kate Excel Worksheet Functions 4 September 27th 07 07:01 PM
Formulas stop calculating slc Excel Worksheet Functions 2 October 9th 06 06:14 AM
Stop calculating on open Daniel Bonallack Excel Worksheet Functions 7 February 19th 06 10:29 PM
stop a formula from re-calculating Becks Excel Discussion (Misc queries) 1 June 15th 05 03:34 PM


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"