DSum criteria

E

Emece

I want to use the DSum function and I have the criteria in different ranges.
In A1:A2 I have one and in G1:G2 the other one. When I want to select them as
the criteria of the function, I try selecting the first range, then press
Ctrl and select the other range. But it doesn't work, Excel keeps telling
ther are too many arguments specified for the function. Which is the correct
way to select different ranges as criteria?

Thanks in advance.

Regards.
Emece.-
 
D

ddibble

Emece,

I think that you can just use a continuous range for your criteria as
long as all of the data in between is 'null'. So given your example
you would have your criteria range = A1:G2. But you need to be sure
that you don't have any values inbetween. I've attached an example.
The first box is the typical setup and the second one to the right
shows what it would look like if you pulled your second criteria over a
few columns. Hopefully you don't have anything inbetween the critieria.
If so, I suggest altering your spreadsheet slightly by either moving
the critiera cells closer to each other or clearing out anything in
between A1:G2.

-Duane


Emece;904159 said:
I want to use the DSum function and I have the criteria in different
ranges.
In A1:A2 I have one and in G1:G2 the other one. When I want to select
them as
the criteria of the function, I try selecting the first range, then
press
Ctrl and select the other range. But it doesn't work, Excel keeps
telling
ther are too many arguments specified for the function. Which is the
correct
way to select different ranges as criteria?

Thanks in advance.

Regards.
Emece.-


+-------------------------------------------------------------------+
|Filename: dsum example.JPG |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=132|
+-------------------------------------------------------------------+
 
A

AdamV

It depends what is in B1:F2
If those cells contain other valid field headings and criteria (values)
then you are stuck - maybe reproduce your critera somewhere else (point
back to the originals eg =A1, =A2 etc)

If they contain:
- nothing
- valid headings but no values
- text that are not valid headings, with or without values
then these will simply be ignored and you could use A1:G2 as your
criteria range.

Hope this helps
 

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

Top