Reputation: 991
I would like to receive a message in case I put a value that already exists in a column, I've found a way to filter distinct records but nothing that would alert me as soon as I add the new element.
Upvotes: 1
Views: 301
Reputation: 27478
As pnuts commented you can use Data Validation and a formula that returns TRUE only when there's one instance of the value in the column. You could use a MATCH
formula like he showed, or this COUNTIF
formula. This addresses the issue pnuts mentioned of checking the whole column:
=COUNTIF(A:A,A2)=1
I entered this under Custom in the Data Validation dialog:
When the user tries to enter the number a second time, they see this:
Upvotes: 3