Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Jan 9, 2004
Messages
1
Location
GB
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
 
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

Back
Top