Count Unique Values on Multiple Criteria

mgskater12

New Member
Joined
Apr 24, 2017
Messages
4
I am looking to count unique values in my sheet based on three criteria.

Column B contains a list of product types (text)
Column D contains a list of formulas (text)
Column E contains a list of units made (#)

I want to count the unique values in column D when units made (column E) are greater than 0 and the product type (column B) is equal to cell A2.

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Countifs doesn't only count unique values. It will count all values in column D and I only want to count unique values.
 
Upvote 0
Code:
[TABLE="width: 130"]
<!--StartFragment--> <colgroup><col width="65" span="2" style="width:65pt"> </colgroup><tbody>[TR]
  [TD="width: 65, align: right"]1[/TD]
  [TD="width: 65, align: right"]5[/TD]
 [/TR]
 [TR]
  [TD="align: right"]2[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]3[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]3[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]4[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]5[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]5[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]3[/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD="align: right"]1[/TD]
  [TD][/TD]
 [/TR]
<!--EndFragment--></tbody>[/TABLE]

=SUM(1/COUNTIF(A1:A9,A1:A9))
 
Upvote 0
Try =SUMPRODUCT(1/COUNTIFS($B$2:$B$4,$A$2,$D$2:$D$4,$D$2:$D$4,$E$2:$E$4,">0"))

Changing the 4 to whatever row your data ends on
 
Upvote 0
Try =SUM(--(FREQUENCY(IF(($B$2:$B$4=$A$2)*($E$2:$E$4>0),MATCH($D$2:$D$4,$D$2:$D$4,0)),ROW($D$2:$D$4)-ROW($D$2)+1)>0)) Ctrl Shift Enter
 
Upvote 0

Forum statistics

Threads
1,224,028
Messages
6,175,993
Members
452,694
Latest member
SaruwatariKaito

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top