ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel Dcount multiple criteria (https://www.excelbanter.com/excel-discussion-misc-queries/131647-excel-dcount-multiple-criteria.html)

FarmerGemGem

Excel Dcount multiple criteria
 
I have these criteria(all need to be fulfilled):

Date Venue Ticketype Postcode

However I want to be able to enter two venues sometimes, and only one other
times. I use Dcount, however it does not work, if I have two criteria one
beneath the other eg:
Venue
York
Castle

=DCOUNT(Data!A1:G200,,A10:F12)

DaveO[_2_]

Excel Dcount multiple criteria
 
The SUMPRODUCT formula can be used with double unary operators to
perform multi-conditional counts, but we'd need to see an example of
your data to suggest a solution. Can you post a sample?


FarmerGemGem

Excel Dcount multiple criteria
 
DATA TO SEARCH(SHEET:DATA):

A B C D E F G
Date Venue TicketType Amount Postcode YC O
12.3.06 York child 1 yo Y
12.3.06 York adult 1 yo
12.3.06 York family 4 ph
12.3.06 York child 1 O
12.3.06 York senior 1 ne
12.3.06 York senior 1 rh
12.3.06 York adult 1 yo Y
12.3.06 York family 4 ca
12.3.06 York child 1 yo
12.3.06 York child 1 O
12.3.06 York family 4 ph
12.3.06 York adult 1 ca
12.3.06 Castle child 1
12.3.06 Castle family 4 ex
12.3.06 Castle adult 1 ex


CRITERIA(SHEET QUERY):
Date Venue TicketType Postcode YC O
??.3.06 york CHILD y
castle

FORMULA TO CALCULATE ANSWER TO CRITERIA:
=DCOUNT(Data!A1:G200,,A10:F12)

Jim Cone

Excel Dcount multiple criteria
 

Dcount is used to count numbers, use DcountA to include text.
Also, you must specify the column to look in as the second argument.
And the third argument should specify the criteria range.
So if the data is in A1:G16 and the criteria range is H1:N3 then...
=DCOUNTA(A1:G16,"Venue",H1:N3)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"FarmerGemGem"

wrote in message
I have these criteria(all need to be fulfilled):

Date Venue Ticketype Postcode

However I want to be able to enter two venues sometimes, and only one other
times. I use Dcount, however it does not work, if I have two criteria one
beneath the other eg:
Venue
York
Castle

=DCOUNT(Data!A1:G200,,A10:F12)

FarmerGemGem

Excel Dcount multiple criteria
 
I am afraid this still does not work.
Any other suggestions?

Thanks for your help
Gemma

"Jim Cone" wrote:


Dcount is used to count numbers, use DcountA to include text.
Also, you must specify the column to look in as the second argument.
And the third argument should specify the criteria range.
So if the data is in A1:G16 and the criteria range is H1:N3 then...
=DCOUNTA(A1:G16,"Venue",H1:N3)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"FarmerGemGem"

wrote in message
I have these criteria(all need to be fulfilled):

Date Venue Ticketype Postcode

However I want to be able to enter two venues sometimes, and only one other
times. I use Dcount, however it does not work, if I have two criteria one
beneath the other eg:
Venue
York
Castle

=DCOUNT(Data!A1:G200,,A10:F12)


Jim Cone

Excel Dcount multiple criteria
 
It worked for me, using your data.
The criteria range used your headings of...
"Date Venue TicketType Amount Postcode YC O"
with York and Castle in the Venue column.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"FarmerGemGem"

wrote in message
I am afraid this still does not work.
Any other suggestions?

Thanks for your help
Gemma

"Jim Cone" wrote:
Dcount is used to count numbers, use DcountA to include text.
Also, you must specify the column to look in as the second argument.
And the third argument should specify the criteria range.
So if the data is in A1:G16 and the criteria range is H1:N3 then...
=DCOUNTA(A1:G16,"Venue",H1:N3)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"FarmerGemGem"

wrote in message
I have these criteria(all need to be fulfilled):

Date Venue Ticketype Postcode

However I want to be able to enter two venues sometimes, and only one other
times. I use Dcount, however it does not work, if I have two criteria one
beneath the other eg:
Venue
York
Castle

=DCOUNT(Data!A1:G200,,A10:F12)



All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com