Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

sum of cells until reach empty cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
phsdave - 28 Oct 2006 10:17 GMT
I would like to get the sum of 7 cells which restarts when a cell containes a
zero.
I want to have a result in an ajoining cell of the sum to a maximum of 7
cells in the ajoining column
Bob Phillips - 28 Oct 2006 13:19 GMT
In B2, enter

=IF(A2=0,SUM(INDEX(A:A,MAX(IF($A$1:A1=0,ROW($A$1:A1)))+1):A1),"")

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

and copy down.

Signature

HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> I would like to get the sum of 7 cells which restarts when a cell containes a
> zero.
> I want to have a result in an ajoining cell of the sum to a maximum of 7
> cells in the ajoining column
Leo Heuser - 28 Oct 2006 14:13 GMT
>I would like to get the sum of 7 cells which restarts when a cell containes
>a
> zero.
> I want to have a result in an ajoining cell of the sum to a maximum of 7
> cells in the ajoining column

Assuming your data in A2 and down and further assuming
B1 is present and empty (or containing text):

In B2:
=IF(A2=0,SUM($A$2:A2)-SUM($B$1:B1),"")

Signature

Best regards
Leo Heuser

Followup to newsgroup only please.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.