ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   DCOUNTA WITH MULTIPLE FIELD CRITERIA (https://www.excelbanter.com/excel-worksheet-functions/161400-dcounta-multiple-field-criteria.html)

galsaba

DCOUNTA WITH MULTIPLE FIELD CRITERIA
 
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


Roger Govier[_3_]

DCOUNTA WITH MULTIPLE FIELD CRITERIA
 
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.

--
Regards
Roger Govier



"galsaba" wrote in message
ups.com...
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




Darren Bartrup[_2_]

DCOUNTA WITH MULTIPLE FIELD CRITERIA
 
Try this link:
http://www.cpearson.com/Newsletter/C...2007_10_08.htm

which is Chip Pearsons newsletter all about Excel data functions.

Peo Sjoblom

DCOUNTA WITH MULTIPLE FIELD CRITERIA
 
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



"galsaba" wrote in message
ups.com...
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





All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com