countif

M

Maz

Is there a function for access that does the same as CountIf in Excel.
I would like to count records in a report by a specific criteria.
Is this possible??????

Thanks in anticipation

Maz T
 
M

Marshall Barton

Maz said:
Is there a function for access that does the same as CountIf in Excel.
I would like to count records in a report by a specific criteria.


General forms of that kind of thing is:

=Count(IIf(condition, 1, Null))
or
=Sum(IIf(condition, 1, 0))
or
=Abs(Sum(condition))

The latter on relies on the Access definitions of True = -1
and False = 0
 

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