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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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