Others

How to Prevent Duplicate People Registration in a Database

Chanuka GeekiyanageChanuka Geekiyanage Oct 10, 2026 868 views

Question details

The user needs to prevent identical person records from being entered into a database by verifying a combination of names to identify duplicates.

How to Prevent Duplicate People from Being Registered in a Database
Product
Spreadsheets and Databases
Device & OS
not provided
Scenario
During data entry, multiple individuals might share the same first name. The system must verify a combination of the person's name, father's name, and grandfather's name to accurately block true duplicates.
Observed behavior
The system currently allows multiple entries with the exact same combination of names, requiring a method to automatically identify and reject these duplicate registrations upon entry.
Before you start

Ensure your data is organized into separate distinct columns (e.g., Column A for Name, Column B for Father's Name, Column C for Grandfather's Name) so that validation rules can accurately evaluate combinations.

Solution 1Recommended

Use Multi-Column Data Validation with COUNTIFS in Spreadsheets

Use a custom formula in Data Validation to prevent users from entering a combination of names that already exists in the sheet.

If you are using a spreadsheet as a lightweight database for registration, you can use the COUNTIFS function to check multiple columns simultaneously.

This method evaluates the newly entered data against existing rows and blocks the entry if all three name fields match an existing record.

1
Select the Data Entry Range

Highlight the columns or specific cells where data entry will occur, for example, columns A, B, and C starting from row 2.

2
Open Data Validation

Navigate to the 'Data' tab on the top ribbon and click on 'Data Validation'.

3
Apply the Custom Formula

In the Settings tab, select 'Custom' from the Allow dropdown menu. Enter the formula: =COUNTIFS(A:A, A2, B:B, B2, C:C, C2)<=1

4
Set an Error Alert

Switch to the 'Error Alert' tab, choose 'Stop' as the style, and type a message like 'This person is already registered.' Click OK to apply.

Use Multi-Column Data Validation with COUNTIFS in Spreadsheets
Real-Time Prevention: The spreadsheet will now automatically display the error message and reject the input if a user types a combination of names that already exists.

Easily Prevent Duplicate Data Entry in WPS Spreadsheet

WPS Spreadsheet provides powerful Data Validation and formula capabilities to help you build a robust data entry system, acting as a highly efficient and lightweight database without the need for complex programming.

  1. 1. Open Your Registration File: Launch WPS Spreadsheet and open the file you use for registering people.
  2. 2. Select the Registration Columns: Highlight the columns representing the person's name, father's name, and grandfather's name.
  3. 3. Access Data Validation: Go to the 'Data' tab and select 'Data Validation' to open the configuration dialog.
  4. 4. Set Up the Prevention Rule: Choose 'Custom', input your COUNTIFS formula checking the respective columns, and define an error message to alert the user.
  5. 5. Save Your Settings: Click OK. WPS Spreadsheet will now act as a strict gatekeeper, preventing any duplicate registrations instantly.
Easily set up multi-condition data validation to prevent duplicate entries.Highlight potential duplicate records instantly with Conditional Formatting.Fully compatible with Microsoft Excel formulas, functions, and database formats.
microsoft office alternative - wps office

Frequently Asked Questions

Can I highlight duplicates instead of blocking them during data entry?

Yes. Instead of using Data Validation, you can use Conditional Formatting. Go to Home > Conditional Formatting > New Rule, and use the same COUNTIFS formula to apply a background color (like red) to rows where the combination of names appears more than once.

What if two different people actually have the exact same name, father's name, and grandfather's name?

Relying strictly on names can sometimes lead to false duplicates. It is highly recommended to introduce a truly unique identifier into your database, such as a National ID number, Social Security Number, or an auto-generated Student ID, to guarantee unique registrations.

How do I remove duplicate records that are already in my spreadsheet?

To clean up existing data, select your data range, go to the Data tab, and click 'Remove Duplicates'. In the popup window, check only the boxes for the specific columns (Name, Father's Name, Grandfather's Name) so it deletes rows only when that exact combination is duplicated.

What is a self-join in a database and how does it relate to duplicates?

A self-join is a query where a table is joined with itself. It is often used to find duplicate records by matching rows that have different primary keys but identical values in the name columns, allowing database administrators to review and merge duplicate entries.