Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Sum contents of multiple cells when the # of multiple cells is unk

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Sum contents of multiple cells when the # of multiple cells is unk

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

"John" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Sum contents of multiple cells when the # of multiple cells is

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.

"Toppers" wrote:

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

"John" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default Sum contents of multiple cells when the # of multiple cells is

Hi John,

First copy the following data from this post and paste into A1:

Col_with_Blanks Col_to_Sum Blank_Check Total
George 22
99
100
Mary 1
Jane 33
1
John 99

Second, copy the following formula from this post and paste into C2:

=IF(A2="","blank","not_blank")

copy C2 and paste into C3:C8

Third, copy the following formula from this post and paste into D2:

=IF(AND(C3="",C2="not_blank"),B2,IF(C2="blank","", IF(C2="not_blank",SUM(B2:OFFSET(B2,MATCH(C2,C3:C8, 0)-1,0)))))

copy D2 and paste into D3:D8

"John" wrote:

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.

(nospam)

"Toppers" wrote:

Try:

=SUM(OFFSET($C$7,0,0,SMALL((IF($B$8:$B$1000<"",RO W(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.

"John" wrote:

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.

"Toppers" wrote:

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

"John" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Sum contents of multiple cells when the # of multiple cells is

Try:

=SUM(OFFSET($C$7,0,0,SMALL((IF($B$8:$B$1000<"",RO W(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.

"John" wrote:

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.

"Toppers" wrote:

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

"John" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Sum contents of multiple cells when the # of multiple cells is

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.

(nospam)

"Toppers" wrote:

Try:

=SUM(OFFSET($C$7,0,0,SMALL((IF($B$8:$B$1000<"",RO W(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.

"John" wrote:

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.

"Toppers" wrote:

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

"John" wrote:

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

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 2000 - Split Contents of Cell Across Multiple Cells DeeW Excel Discussion (Misc queries) 7 November 8th 06 09:10 PM
macro copy/paste data from multiple cells to multiple cells Diana Excel Discussion (Misc queries) 0 July 10th 06 09:24 PM
make multiple cells in 1 worksheet equal multiple cells in another riley454 Excel Worksheet Functions 1 January 19th 06 03:00 PM
How do I combine the contents of multiple cells in one cell? Debbie Excel Worksheet Functions 3 December 16th 05 10:57 PM
Linking contents of multiple cells to an external object Rafi Excel Discussion (Misc queries) 0 August 30th 05 01:45 PM


All times are GMT +1. The time now is 05:54 AM.

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

About Us

"It's about Microsoft Excel"