Countif no duplicates

uwish7

New Member
Joined
Jul 26, 2017
Messages
26
Is there a way to use the Countif function and remove duplicates

Countif FG Component
=Countif(C:C, c2) 22070090 300432

In the example below if I drag down the formlar , I will have the same number repeated. How do I remove it?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this formula
Code:
=IF(COUNTIF($C$2:C2,C2)=1,COUNTIF($C$2:$C$20,C2),"")

Book1
CD
212
321
482
51 
641
751
88 
9 
Sheet1
Cell Formulas
RangeFormula
D2=IF(COUNTIF($C$2:C2,C2)=1,COUNTIF($C$2:$C$20,C2),"")
D3=IF(COUNTIF($C$2:C3,C3)=1,COUNTIF($C$2:$C$20,C3),"")
D4=IF(COUNTIF($C$2:C4,C4)=1,COUNTIF($C$2:$C$20,C4),"")
D5=IF(COUNTIF($C$2:C5,C5)=1,COUNTIF($C$2:$C$20,C5),"")
D6=IF(COUNTIF($C$2:C6,C6)=1,COUNTIF($C$2:$C$20,C6),"")
D7=IF(COUNTIF($C$2:C7,C7)=1,COUNTIF($C$2:$C$20,C7),"")
D8=IF(COUNTIF($C$2:C8,C8)=1,COUNTIF($C$2:$C$20,C8),"")
D9=IF(COUNTIF($C$2:C9,C9)=1,COUNTIF($C$2:$C$20,C9),"")
 
Upvote 0
Try this formula
Code:
=IF(COUNTIF($C$2:C2,C2)=1,COUNTIF($C[COLOR="#FF0000"][B]$[/B][/COLOR]2:$C$20,C2),"")
A very minor thing but you could save a little processing by removing that red $
For example, in row 4 of your sample data, the fact that the logical test in your if statement is TRUE, means that there must not be any 8s above row 4 so there is no need to include rows 2 & 3 in the COUNTIF.
Of course the longer the list is and the further down the sheet the formula gets copied, the greater the saving when a new value is found.
 
Upvote 0
A very minor thing but you could save a little processing by removing that red $
For example, in row 4 of your sample data, the fact that the logical test in your if statement is TRUE, means that there must not be any 8s above row 4 so there is no need to include rows 2 & 3 in the COUNTIF.
Of course the longer the list is and the further down the sheet the formula gets copied, the greater the saving when a new value is found.
You are right
Unintended mistake
Thanks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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