×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# COUNT statement based on 2 criteria

 Forum Search FAQs Links MVPs

## COUNT statement based on 2 criteria

(OP)
Hi

I am trying to put a formula into a worksheet that will count the number of cells, on a separate worksheet, which meet two criteria - namely place name and type.

I have tried the following;

=SUM(('Weekly Referrals '!B:B="Barwood")*('Weekly Referrals '!E:E="S"))

All I get from the result is 0.

Any help would be appreciated!!

Jay

### RE: COUNT statement based on 2 criteria

Use the DCOUNT(database,field,criteria) function.

### RE: COUNT statement based on 2 criteria

Jay,

You can probably use your formula, provided you enter it as an array formula (press Ctrl-Enter after entering the formula, instead of Enter)
DCOUNT is better, because it is faster. Array formulas tend to get very slow if you have a lot of data.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

### RE: COUNT statement based on 2 criteria

If you have hassle with use of DCount can add another column in parallel, eg in G1 put
=AND(B1="Barwood",E1="S").

Then where you want the total use
=Countif(G1:Gx,TRUE)

### RE: COUNT statement based on 2 criteria

Jay,
Perhaps it is little bit late. But just look at Thread770-85502

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!