View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
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