Something Stupid

G

Guest

Guest
The range below is called database
Customer $$ Code
AA 25 NB
BB 10 NB
CC 10 NB

Value and Code is called Criteria

Value Code
25 NB =DCOUNTA(database, "Customer", Criteria)

Why did I get 3? I thought the answer is supposed to be 1? Any mistakes in my formula?? Help guys
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Well, "Value" does not exist in "Database". You have to use the same label in the criteria range as well as in the database range. Arrange your data like this:

{"Value","Code","";
25,"NB","";
"","","";
"Customer","Value","Code";
"AA",25,"NB";
"BB",25,"NB";
"CC",10,"NB"}

e.g., in A1:C7. Name A1:B2 as "Criteria", A4:C7 as Database, and use:

=DCOUNTA(Database, 1, Criteria)

1 designates the Customer field, though any of [1,2,3] will do.


On 2002-03-10 22:58, Anonymous wrote:
The range below is called database
Customer $$ Code
AA 25 NB
BB 10 NB
CC 10 NB

Value and Code is called Criteria

Value Code
25 NB =DCOUNTA(database, "Customer", Criteria)

Why did I get 3? I thought the answer is supposed to be 1? Any mistakes in my formula?? Help guys
 
Upvote 0
Hi, thanks, I fixed that... but the problem still persists... I want the criteria to be an AND, it seems excel interprets it as an OR. If you're interested, I'll mail you the xls file.
 
Upvote 0
On 2002-03-10 23:36, Anonymous wrote:
Hi, thanks, I fixed that... but the problem still persists... I want the criteria to be an AND, it seems excel interprets it as an OR. If you're interested, I'll mail you the xls file.

I get 1 as result, not 3. If you like, use:

aky@sem.hhs.nl
 
Upvote 0
On 2002-03-10 23:36, Anonymous wrote:
Hi, thanks, I fixed that... but the problem still persists... I want the criteria to be an AND, it seems excel interprets it as an OR. If you're interested, I'll mail you the xls file.

Criteria range, as I said, must have labels that exist in the first row of the database.

You had in your WB "Value" instead of "Claimable".

The WB is underway to you.

Aladin
 
Upvote 0

Forum statistics

Threads
1,214,432
Messages
6,119,468
Members
448,900
Latest member
Fairooza

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