dcounta produces double counting

M

macroapa

Hi, I have a simple table of data as follows:

Database
Name Ref Status
Steve A1 Y
Dave A1A Y
Steve A1 N
Dave A1A N

Now I want to run DcountA based on the status being Y and for each
ref:

Criteria
Ref Status
A1 Y

Now I use Dcounta(Database,"Status",Criteria) and expect it to return
1, but it returns 2 as it counts anything that is like "A1" and so
includes "A1A".

How can i get it to return only matching criteria and not 'like'
criteria?

Many thanks.
 
J

Jim Rech

Enter the Ref criterion as '=A1

="=A1" also seems to work.


--
Jim
| Hi, I have a simple table of data as follows:
|
| Database
| Name Ref Status
| Steve A1 Y
| Dave A1A Y
| Steve A1 N
| Dave A1A N
|
| Now I want to run DcountA based on the status being Y and for each
| ref:
|
| Criteria
| Ref Status
| A1 Y
|
| Now I use Dcounta(Database,"Status",Criteria) and expect it to return
| 1, but it returns 2 as it counts anything that is like "A1" and so
| includes "A1A".
|
| How can i get it to return only matching criteria and not 'like'
| criteria?
|
| Many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top