ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting with multiple criteria in multiple columns (https://www.excelbanter.com/excel-worksheet-functions/446269-counting-multiple-criteria-multiple-columns.html)

1609em

Counting with multiple criteria in multiple columns
 
For Example : In column G the values 21F, 23, 10F, 45 exist and in column D the values P, C , T exist. I need a formula to count if column G has 21f and 45 AND column D has a P in it.

G D

21F P
23 P
10F C
45 P


So i need something to show that there are 2 of this combination.

Vacuum Sealed

Counting with multiple criteria in multiple columns
 
On 8/06/2012 10:40 PM, 1609em wrote:
For Example : In column G the values 21F, 23, 10F, 45 exist and in
column D the values P, C , T exist. I need a formula to count if column
G has 21f and 45 AND column D has a P in it.

G D

21F P
23 P
10F C
45 P


So i need something to show that there are 2 of this combination.




Hi

Try this

=SUMPRODUCT(($D$2:$D$10000="P")*($G$2:$G$10000="21 F")+(($D$2:$D$10000="P")*($G$2:$G$10000=45)))

This formula assumes the 1st row is the header, you can adjust the range
to suit.

HTH
Mick.




All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com