Pulling criteria for DCOUNT/DSUMs from multiple locations

steff.sullivan

New Member
Joined
Aug 18, 2008
Messages
20
Hi,
I have to use DCOUNTs to provide month by volumes for different sets of criteria. I'm looking to create a more elegant solution than having for each of the 12 volume criteria their own set of conditions for each month (12x12 sets of criteria) so I was hoping to have 12 sets of criteria and union on an extra criteria that could simply be the date field and the monthly value that is already present on the sumamry table.

So I'd like a dcount that looks like
Code:
=dcount(rawdata,"historyperiod",b1:b2+f1:h2)
but obviously the + operator is not the right way to do it. Has anybody done this before and it able to tell me how to do this?

I know this could be better done with countifs/sumifs but alas most users in work are on 2003 so it's not a suitable option. I'm also loathe to add in myriad code into the SQL that gets the rawdata as this will make things difficult to maintain and won't be transparent to users what the criteria are.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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
Back
Top