Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sum of numbers until zero value is hit

Seems like a confusing description. Here's what I want to accomplish.

A B
-------
1 | 3 3
|
2 | 5 8
|
3 | 0 0
|
4 | 4 4
|
5 | 2 6
|
6 | 1 7

What I want to do is sum the series of column A (looking 'upward') until
a zero value is met. Then the sums start over.

In actual use, I am only looking at the past 7 or 14 days (two separate
columns)

It seems to me that this could be done by nesting IF functions.

Perhaps there is a better approach?

Thanks to all.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Sum of numbers until zero value is hit

One way:

B1: =A1
B2: =IF(A2=0,0,B1+A2)

Copy down as far as necessary

In article <HYR%h.166076$6m4.60369@pd7urf1no,
bbelly wrote:

Seems like a confusing description. Here's what I want to accomplish.

A B
-------
1 | 3 3
|
2 | 5 8
|
3 | 0 0
|
4 | 4 4
|
5 | 2 6
|
6 | 1 7

What I want to do is sum the series of column A (looking 'upward') until
a zero value is met. Then the sums start over.

In actual use, I am only looking at the past 7 or 14 days (two separate
columns)

It seems to me that this could be done by nesting IF functions.

Perhaps there is a better approach?

Thanks to all.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Sum of numbers until zero value is hit

Maybe something like this:

=SUM(INDIRECT("A1:A"&MATCH(0,A:A,0)))

HTH,
Paul


"bbelly" wrote in message
news:HYR%h.166076$6m4.60369@pd7urf1no...
Seems like a confusing description. Here's what I want to accomplish.

A B
-------
1 | 3 3
|
2 | 5 8
|
3 | 0 0
|
4 | 4 4
|
5 | 2 6
|
6 | 1 7

What I want to do is sum the series of column A (looking 'upward') until
a zero value is met. Then the sums start over.

In actual use, I am only looking at the past 7 or 14 days (two separate
columns)

It seems to me that this could be done by nesting IF functions.

Perhaps there is a better approach?

Thanks to all.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sum of numbers ... Thanks BUT limiting to last seven (or fourteen)entries

Now that I see the solution(s) from JE & Stan, the dimmer on the light
bulb has turned way up.

I had been thinking in terms of PCLIVE's solution, but must adhere to
the KISS rule.

Thanks for the help

The second part of this is to only look at a maximum of seven entries.
(fourteen in another column). But stop the sum if a zero is hit(I guess
I didn't really make that point clear, since I was thinking in terms of
a nest to capture the last seven (14) values.

In other words, the sum of the last seven (14) entries until a zero
value is met.

Thanks again


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
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
change 2000 cells (negative numbers) into positive numbers lisbern Excel Worksheet Functions 2 August 16th 06 05:54 PM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 09:52 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 1 January 9th 06 01:23 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM


All times are GMT +1. The time now is 10:06 PM.

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"