CountIF based on unique values

wangaa11

New Member
Joined
Feb 28, 2020
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
Hello, I am trying to count the number of times "positive" occurs however the positive could occur duplicate times for a unique value and I only want to count the positive the one time in that instance.



For example and I would attach an actual example but it for whatever reason isn't working so I hope this will do.

H235 Negative
HA260 Negative
H235 Positive
H789 Positive
HA852 Negative
HA951 Negative
HA951 Negative
HA951 Positive
H235 Positive

I should only have 3 "positives" as H235 & HA951 has a duplicate positive

I should note there are over hundreds of rows of data which has a number of unique H values in that first "column" Any assistance on this is greatly appreciated
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
How about
+Fluff v2.xlsm
ABCD
1
2H235Negative3
3HA260Negative
4H235Positive
5H789Positive
6HA852Negative
7HA951Negative
8HA951Negative
9HA951Positive
10H235Positive
11
Master
Cell Formulas
RangeFormula
D2D2=SUM(--(FREQUENCY(IF(B2:B10="Positive",MATCH(A2:A10,A2:A10,0)),ROW(A2:A10)-ROW(A2)+1)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How about
+Fluff v2.xlsm
ABCD
1
2H235Negative3
3HA260Negative
4H235Positive
5H789Positive
6HA852Negative
7HA951Negative
8HA951Negative
9HA951Positive
10H235Positive
11
Master
Cell Formulas
RangeFormula
D2D2=SUM(--(FREQUENCY(IF(B2:B10="Positive",MATCH(A2:A10,A2:A10,0)),ROW(A2:A10)-ROW(A2)+1)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.
thank you for the help however I am still getting a value error and I even used the sample that you provided with the exact same setup and I am getting an error
 
Upvote 0
How about
+Fluff v2.xlsm
ABCD
1
2H235Negative3
3HA260Negative
4H235Positive
5H789Positive
6HA852Negative
7HA951Negative
8HA951Negative
9HA951Positive
10H235Positive
11
Master
Cell Formulas
RangeFormula
D2D2=SUM(--(FREQUENCY(IF(B2:B10="Positive",MATCH(A2:A10,A2:A10,0)),ROW(A2:A10)-ROW(A2)+1)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.
However what is interesting is if I move the formula down to D4 I get a 1?
 
Upvote 0
What error are you getting?
Also did you confirm the formula with Ctrl Shift Enter?
 
Upvote 0
What error are you getting?
Also did you confirm the formula with Ctrl Shift Enter?
I am getting a #Value! error.

It worked. I did ctrl shift enter incorrectly. It is working now thank you.
 
Upvote 0
For future reference
While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.

 
Upvote 0

Forum statistics

Threads
1,214,531
Messages
6,120,073
Members
448,943
Latest member
sharmarick

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