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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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