Countif With Critiera

J

JR573PUTT

I have 2 sheets, one summary, and one detail.

The detail is as follows:


Dept units
331 12
331 24
331
331 12
332
332 36
332 24
333

The summary is as follows:


Dept # of styles
331 3
332 2
333 0

I want the formula on the summary sheet to count the number of non
blank entries for each dept.

Which formula is it?
 
G

gjcase

Assume Sheet1 contains your original data in cells A1:B9, including th
headers "Dept" and "Units" (

Sheet2 contains your summary & Criteria

Criteria for dept 331 is specified as follows in D1:D2. Note "Dept
must exactly match the header in the table, including any spaces; i
helps to copy/paste this to the criteria range.

Dept
331

The summary for Dept 331 contains the formula

=DCOUNT(Sheet2!$A$1:$B$9,2,D3:D4)

Same for the other depts

---Glen
 
G

gjcase

Sorry, typo, the formula s/b as follows, to reference the range on shee
1

=DCOUNT(Sheet1!$A$1:$B$9,2,D3:D4
 

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

Top