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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count data cells in Excel based on multiple criteria 2

Status
Not open for further replies.

adfo

Programmer
Oct 23, 2009
30
US
I have an excel table with three fields (file uploaded and link attached). I need to generate tables to count data cells based on multiple criteria within the table. The data and the tables are described in the attached excel file. I think this could be accompolished by using either excel built-in functions or VBA. I prefer the excel functions if possible. Thanks
 
I haven't looked at your file but the DCount function sounds designed to do the trick.

Gavin
 
Ok Sumproduct simpler in your situation. In cell D11 and copied down and across:
=SUMPRODUCT(--(Data!$A$2:$A$2929>=Table!$B11),--(Data!$A$2:$A$2929<=Table!$C11),--(Data!$B$2:$B$2929>=Table!D$9),--(Data!$B$2:$B$2929<=Table!D$10))

Now I would actually use named ranges within the formula...

Gavin
 


hi,

Using Named Ranges for your DATA...
[tt]
Table 1
=SUMPRODUCT((A>=$B11)*(A<=$C11)*(B>=D$9)*(B<=D$10))

Table 3
=SUMPRODUCT((A>=$B25)*(A<=$C25)*(B>=D$9)*(B<=D$10)*(C_>=45)*(C_<=180))
[/tt]

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top