Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

COUNT statement based on 2 criteria

Status
Not open for further replies.

JayUK

Computer
Jan 9, 2004
1
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
 
Replies continue below

Recommended for you

Use the DCOUNT(database,field,criteria) function.
 
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.
 
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)

 
Jay,
Perhaps it is little bit late. But just look at thread770-85502
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor