Reputation: 9
I am trying to identify unique values in a range by placing a 1 or 0 next to value if it has been repeated or not.
ex:
A B
5368907942322 1
5368907942322 0
5368907942322 0
5368907942323 1
5368907942323 0
5368907942323 0
5368907942324 1
5368907942325 1
Will be using 1 or 0 as criteria for another formula
Upvotes: 0
Views: 205
Reputation: 27869
In B1
your formula would be:
=IF(COUNTIF($A$1:A1,A1)=1,1,0)
However, if you want to check for uniqueness this is what you need:
=IF(COUNTIF(A:A,A1)=1,1,0)
Upvotes: 2
Reputation: 346
If I'm understanding the question right, a simple if statement should work:
=If(A2=A1,0,1)
Just enter the formula and drag it down.
Upvotes: 1