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 / March 2007

Tip: Looking for answers? Try searching our database.

Sum contents of multiple cells when the # of multiple cells is unk

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 24 Mar 2007 07:05 GMT
Hello and Help!  :-)

I have this formula that works just like I want it to as long as cell b8 is
the only empty cell below cell b7.

=IF(AND(""=B8,B8=""),SUM(C7:C8),C7)

Or It could also be written like this. This seems cleaner and simpler to me.

=IF(B8="",SUM(C7:C8),C7)

However I need to know if there is a way to make either of the above
statements work if there are multiple empty cells below cell b7 when the
number of those empty cells is unknown. Keep in mind that the sum range above
of C7:C8 also needs to automatically adjust to include the next row(s) down
as well.

Any help would be greatly appreciated
Toppers - 24 Mar 2007 10:11 GMT
Can you explain what you are trying to do?

If B8 to B10 are empty, (but B11 has data?) should we sum C7 to C10 ?

The AND condition is redundant in your formula A=B is the same as B=A) so
use the second one

> Hello and Help!  :-)
>
[quoted text clipped - 14 lines]
>
> Any help would be greatly appreciated
John - 24 Mar 2007 15:38 GMT
Yes, if B8 to B10 are empty but B11 has data then C7 to C10 should be sumed.  
The catch is the number of empty cells is random in each instance.  So that
when I populate my spreadsheet I am having to go in and manually adjust the
formula for each occurance of empty cells in column B as well as manually
adjust the range that is being sumed.

Any suggestions?

I agree in this case the AND condition is redundant.

> Can you explain what you are trying to do?
>
[quoted text clipped - 21 lines]
> >
> > Any help would be greatly appreciated
Toppers - 28 Mar 2007 00:08 GMT
Try:

=SUM(OFFSET($C$7,0,0,SMALL((IF($B$8:$B$1000<>"",ROW(8:1000),99^99)),1)-7))

Entered with Ctrl+ShifT+Enter [CSE] (an array formula) which will have {}
surrounding the formula if entered with CSE.

Change the B1000/ROW(..) to suit your range.

> Yes, if B8 to B10 are empty but B11 has data then C7 to C10 should be sumed.  
> The catch is the number of empty cells is random in each instance.  So that
[quoted text clipped - 31 lines]
> > >
> > > Any help would be greatly appreciated
John - 28 Mar 2007 02:06 GMT
Toppers,
Thanks for the reply, however, this still didnt work. I made some
adjustments to the cell references to fit my situation still nada...  I would
like to send a copy of my example spreadsheet so you can really see what I am
trying to do as it is kina hard to explain in words on here.  I would just
attach to this post if it would let me.

jwgrizz62@yahoo.com(nospam)

> Try:
>
[quoted text clipped - 40 lines]
> > > >
> > > > Any help would be greatly appreciated
 
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.