Prevent duplicates in excel sheet

xl3ruise

New Member
Joined
Oct 27, 2020
Messages
5
Office Version
  1. 2019
Hello,

I want to create a simple form for people who come to do a one-time trial lesson at my gym.
So I want to create a form where we can fill in name, phone number and email. But I want to avoid filling in duplicates.

I saw some examples with = COUNTIF ($ A $ 2: $ A $ 20, A2) <= 1
But when I try I get an error.

It would be nice if it is possible to create a warning box, so if you duplicate a word, you get a warning: "This name already exists, do you want to continue?" If you press yes it will be duplicated and if you say no it will be deleted ..?

Does anyone have an idea?

Regards,
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If you select A2:A20, then click on data validation(on the data ribbon tab) then in settings select Custom under allow & enter this formula
Excel Formula:
=COUNTIFS(A$2:A2,A2)<=1
Then goto the Error Alert tab & under style select "Warning" then Ok
 
Upvote 0
If you select A2:A20, then click on data validation(on the data ribbon tab) then in settings select Custom under allow & enter this formula
Excel Formula:
=COUNTIFS(A$2:A2,A2)<=1
Then goto the Error Alert tab & under style select "Warning" then Ok
Thanks for your reply, but it will gives me this error:
error.png
 
Upvote 0
You need to convert the formula to your language version.
If that is Dutch try
Excel Formula:
=AANTALLEN.ALS(A$2:A2;A2)<=1
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,089
Members
448,548
Latest member
harryls

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