DCOUNTA WITH MULTIPLE FIELD CRITERIA

G

galsaba

How can I create a statement that will take in consideration criterai
in two fields.
For example, all rows where the last name is Smith, and the City is
NYC.

Thanks,
galsaba
 
R

Roger Govier

Hi

One way
With last name in column A and City in column B
=SUMPRODUCT(--($A$1:$A$1000="Smith"),--($B$1:$B$1000="NYC"))

Change ranges to suit.
 
P

Peo Sjoblom

One way

=DCOUNTA(Database,"City",F1:G2)


Where in this case the criteria (F1:G2) looks like

Last Name City
Smith NYC

Criteria that are on the same row means that you are using what is in fact
AND functionality,
on separate rows it is OR


You can replace City in the formula with Last Name or any other header in
your database


--


Regards,


Peo Sjoblom
 
Top