Explanation

Custom validation allows you to create your own rule using a formula.

Example 1 — Prevent Duplicate Employee IDs

Suppose Employee IDs are in A2:A100.

Custom formula:

=COUNTIF($A$2:$A$100,A2)=1

This checks whether the entered ID is unique.

Example 2 — Salary Must Be Positive

=B2>0

Example 3 — Required Email Format

A basic validation can check whether an email contains @:

=ISNUMBER(SEARCH(“@”,C2))

Practice

Create custom validation rules for:

  1. Positive salary
  2. Unique Employee ID
  3. Email containing @