DCOUNTA WITH MULTIPLE FIELD CRITERIA

  • Thread starter Thread starter galsaba
  • Start date Start date
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
 
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.
 
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
 

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

Back
Top