DSUM : blank cell as a required criteria, can it be done?

C M P

New Member
Joined
Mar 20, 2007
Messages
17
The Scenario:

..........A................B...............C
1....HeaderA.....HeaderB.....Header C
2.......10................................3
3........2..................................
4........6................9................
5.......13.................................


The Question:

Is it possible to only sum the cells within A2:A5 in which the corresponding cells in column B and C are empty?
(The desired answer in this case being 2+13=15).

If this is possible, in what ways could it be most easily accomplished?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,079
DSUM criteria ranges accept custom formulas.
Normaly, the first row of a criteria range holds the header name for the condition. If a cell in the top row of a criteria range is blank, it signals that the cell below holds a formula similar to those used for condidional formatting and validation.

=AND(B1="",C1="")

should do what you want.

Help system "criteria range" goes into this in greater detail.
 

C M P

New Member
Joined
Mar 20, 2007
Messages
17
My apologies for not fully understanding your reply. Perhaps this image can better clarify my question.

Excel_Example.jpg
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Book4
ABCDE
1
2FALSEFALSETRUE
3
4
5Date Debt OccurredDebt AmountAmount PaidDate PaidDate Account Closed
61/1/200710101/2/2007
71/2/200720201/3/2007
81/3/200730
91/4/200740401/5/2007
101/5/200750501/6/2007
111/6/200760
121/7/2007702/22/2007
131/8/200780801/8/2007
141/9/200790901/9/2007
15DSUM:90
16SUMPRODUCT:90
17
Sheet1


Criteria range: A1:C1 empty.

A2, copied across to C2:

=C6=""

E15: with DSUM

=DSUM(B5:E14,1,A1:C2)

A different approach...

F15:

=SUMPRODUCT(B6:B14,--(C6:C14=""),--(D6:D14=""),--(E6:E14=""))

DSUM would execute faster, while the setup for it would require some effort...
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,079
=dsum(a5:e14,"debt amount",a1:e2) with "=0" in c2 , blanks in other row 2 cells.
 

Forum statistics

Threads
1,147,921
Messages
5,743,883
Members
423,823
Latest member
Zxcvbnm58

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top