Summing problem

D

Dr. Weird

Excel 2000, here's the prob:

Column
A B C
100 50
200 150
300 250 20
400 10
-------------------------
Total


Total for Col A is standard, SUM(A1:A4). Total for Col B must be calculated
like this: if there is empty cell in Col B (B1 and B4 in this example), it's
taken from the Col A, so Total for Col B is 100 (from Col A)+150+250+400
(again from Col A). The same applies to Col C (Total is 50+200(from Col
A)+20+10).

It's 2am now, and I'm going a bit crazy with IF, SUM, SUMIF, ISBLANK
megaformulas :). Thought of a hidden column for calculation (one for each of
the columns maybe, there will be 5-6 max) but is there any other solution?

Thanks.
 
P

Peo Sjoblom

For B

=SUMPRODUCT((B1:B4="")*(A1:A4)+B1:B4)

for C

=SUMPRODUCT((C1:C4="")*(A1:A4)+C1:C4)
 
R

Ron Rosenfeld

Excel 2000, here's the prob:

Column
A B C
100 50
200 150
300 250 20
400 10
-------------------------
Total


Total for Col A is standard, SUM(A1:A4). Total for Col B must be calculated
like this: if there is empty cell in Col B (B1 and B4 in this example), it's
taken from the Col A, so Total for Col B is 100 (from Col A)+150+250+400
(again from Col A). The same applies to Col C (Total is 50+200(from Col
A)+20+10).

It's 2am now, and I'm going a bit crazy with IF, SUM, SUMIF, ISBLANK
megaformulas :). Thought of a hidden column for calculation (one for each of
the columns maybe, there will be 5-6 max) but is there any other solution?

Thanks.

*Array-Enter* this formula in B6,then copy/drag it across as needed:

=SUM(IF(ISNUMBER(B1:B4),B1:B4,$A$1:$A$4))

To array-enter a formula, hold down <ctrl><shift> while hitting <enter>. XL
will place braces {...} around the formula.


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Summing Data 3
VLOOK UP 1
Triple IF? 2
adding figures that match 2 true and 1 false if statement conditio 5
Sumproduct in Excel 2003 3
Nested IF conditions 3
Add Time Q 4
Complicated SUM IF formula 2

Top