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
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.
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)
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.