Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSUM multiple criteria single headings 2

Status
Not open for further replies.

skitrumpet

Technical User
Aug 26, 2010
5
GB
Hi,

Apologies if this has been asked before, I wasn't able to track anything down with a search.

Is it possible to use the DSUM formula with one standard set of headings and multiple criteria below them and return data based on each individual row.

For example:

Product Country
Teddy bear UK Return total teddy bears in UK
Colouring book US Return total colouring books in US
Teddy bear France Return total teddy bears in France
Drum US Return total drums in US
Colouring book UK Return total colouring books in UK

I think if I use DSUM for the second combination, colouring book and US, and select the range to include the category headings, I will also get the number of teddy bears in the UK.


Thanks in advance for any help

Adam
 



Hi,

Why not use a PivotTable?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
No it isn't possible. That is how you specify an OR condition to DSUM.

If a pivotTable won't do it for you (why wouldn't it?) then I would use SumProduct. Using named ranges something like:
=sumproduct(--(Product=A2),--(Country=B2))
or
=sumproduct(--(Product=A2),--(Country=B2),Quantity)

You could also have DSUM with hidden rows.


Gavin
 
Thanks for your comments guys.
I guess I was trying to be too clever and completely ignored the pivot table.

I'll keep it simple next time!


Cheers

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top