How to get a count of unique values based on 2 criteria

henryg

Board Regular
Joined
Oct 23, 2008
Messages
145
Office Version
  1. 365
Platform
  1. Windows
I have a list of, say, products with duplicate values allowed in Column A and various numeric values in Column B (eg sales volumes or sales values) including zero. I want a count of the unique items in Column A that have a zero in Column B.

I'm convinced there should be a (simple?) solution, but can't seem to find one.
 
Glad you sorted it & thanks or the feedback.
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I have a list of, say, products with duplicate values allowed in Column A and various numeric values in Column B (eg sales volumes or sales values) including zero. I want a count of the unique items in Column A that have a zero in Column B.

I'm convinced there should be a (simple?) solution, but can't seem to find one.
E3 =INDEX($A$2:$A$9,SMALL(IF(B2:B9=0,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$3:E3)))
 
Upvote 0
@Rahul1987
Not sure if you realise but this thread is almost a year old. Also your formula is not counting the number of unique values which is what was asked for.
 
Upvote 0
@Fluff
G11 -=SUM(IF(FREQUENCY(IF(B2:B9=0,MATCH(A2:A9,A2:A9,0)),ROW(B2:B9)-ROW(B2)+1),1))

I thought it was asked to extract data...
thanks for your concern , however I am just trying to improve my skills by reading various threads so that it will help me a lot. I am just looking at them now coz I am a new here.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
Latest member
Arbind kumar

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