Excel Data Validation Examples
The following worksheets have various completed Data Validation examples as mentioned in the following Sup
   See more online: Apply Data Validation to cells
Each worksheet is listed below, along with what kind of Data Validation you'll find
Worksheet               Data Validation Type
Whole number            Limit entries to whole numbers
Decimal                 Limit entries to decimal (percentage) values
Departments             Limit selections to list choices
Cost centers table      Table for Cost center list source
Cost center budget      Limit selections to Cost center list choices
Date                    Limit entries to dates within a range
Time                    Limit entries between a time frame
Text length             Limit entries to a certain number of characters
HR Budget               Limit entries to a certain maximum amount
Products                Require entries to meet certain text guidelines
Age verification        Limit entries below a certain age
Custom values           Limit entries to unique values only (no repeated entries)
E-Mail                  Require entries to contain the @ symbol
 Cells highlighted like this are for input:
Input here
oned in the following Support.Office.com article:
                                    Data Validation is limited to the following options:
Data Validation - Limit entry to a whole number
   Ranking                                                      Ranking
      7
                                                    This example limits users to entries
                                                   between 1 (Minimum) and 10
                                                   (Maximum).
  Number of                                                   Dependents
  Dependents           Deductions
                                                    This example limits users to entries
      2                    4                       greater than or equal to 2 times the
                                                   value in cell A14. The Minimum value
                                                   is determined by a formula:
                                                   =2*A14
 See more online: Apply Data Validation to cells
 Limit entry to values between 1 and 10
 Use a formula to limit an entry
Data Validation - Limit entry to a decimal
 Current Salary      Annual Merit Increase         New Salary                Decimal
   $50,000                  3.0%                    $51,500      This example limits users to a
                                                                decimal (percent) value less than or
                                                                equal to 3%.
 See more online: Apply Data Validation to cells
                         Limit entry to a decimal value less than or equal to 3%
ecimal
imits users to a
t) value less than or
Data Validation List with a Table for a source
Department         Dept ID                 Department                 Steps
Accounting                   401           Sales
                                                        1. Add your list data and format it
Payroll                      501                        as a Table (Home tab > Styles >
Human Resources              301                        Format as Table).
Sales                        201                        2. It's not necessary, but you can
Marketing                    601                        name your table from the Table
                                                        tools tab - this one is named
Operations                   701                        "DepartmentTable". This will
Executive                    101                        help you keep track of multiple
                                                        tables.
                                                        3. Add a Named Range for your
                                                        list, by selecting the list range
  See more online: Apply Data Validation to cells       (A4:A10 in this case), then from
                                                        the Formulas tab select Name
                                                        Manager, and input an
                                                        appropriate name. This one is
                                                        named "DepartmentList".
                                                        4. Select the cell where you want
                                                        your Data Validation list (D4 in
                                                        this case), and go to the Data tab
                                                        > Data Validation > Allow List >
                                                        Source > "=DepartmentList".
                                                        5. Add Input and Error Messages
                                                        as needed.
               Use the Name Manger to create and manage Defined Names
d format it
Styles >
ut you can
 he Table
amed
his will
multiple
 for your
  range
hen from
t Name
s one is
t".
 you want
t (D4 in
e Data tab
 w List >
tList".
Messages
 Create your Data Validation List
 Add Input & Error Messages
Excel Table that can be used for a Data Validation List source
 Cost Center    Category                                                                Use the Name Manger to c
     110        Salary - Regular Wages                    Cost Centers
     120        Salary - Hourly Wages
                                                 This list is used in the second
     130        Salary - Commission             example in the next worksheet (Cost
     140        Salary - Bonus                  Center Budget).
     150        Salary - Vacation                It's named "lst_CostCenter" in the
     160        Salary - Sick Time              Name Manager (Formulas > Name
                                                Manager).
     170        Tax - Fed
     180        Tax - State
     190        Tax - SDI
  See more online: Apply Data Validation to cells
tion List source
 Use the Name Manger to create and manage Defined Names
                                                                    DID YOU KNOW?
                                                             If you use Excel Tables for your D
                                                            Validation List source, then your lis
                                                               will be dynamic - that is, they wil
                                                           automatically adjust themselves as
                                                                     add or remove items!
  DID YOU KNOW?
 u use Excel Tables for your Data
ation List source, then your lists
 be dynamic - that is, they will
atically adjust themselves as you
   add or remove items!
Data Validation - Limit a list to certain entries
                                        Current Year     Future Year
Cost Center Category
                                         Projected         Budget
                                                                         Variance                     Cost Cen
   110      Salary - Regular Wages              63,578          60,000        (3,578)    This example limits u
                                                                                        entries from 100-999 in
   120      Salary - Hourly Wages               19,721          25,000         5,279
   130      Salary - Commission                 37,500          40,000         2,500     Or look at the next ex
                                                                                        to use the list from the
   140      Salary - Bonus                      12,605                                  worksheet to set up a l
   150      Salary - Vacation                   28,391          30,000         1,609
   160      Salary - Sick Time                   7,303           8,500         1,197
   170      Tax - Fed                           44,985          50,000         5,015
   180      Tax - State                         20,287          21,000           713
   190      Tax - SDI                            1,470           1,500            30
Data Validation - Use the Cost Center list
                                        Current Year     Future Year
Cost Center Category                                                     Variance          Use VLOOKUP t
                                         Projected         Budget
                                                                                                Category
   110      Salary - Regular Wages              63,578          60,000        (3,578)
   120      Salary - Hourly Wages               19,721          25,000         5,279     Note the VLOOKUP fo
                                                                                        both tables that return
   130      Salary - Commission                 37,500          40,000         2,500    name based on the Cos
   140      Salary - Bonus                      12,605                                  entry/selection.
   150      Salary - Vacation                   28,391          30,000         1,609     You can click this to le
   160      Salary - Sick Time                   7,303           8,500         1,197    VLOOKUP.
   170      Tax - Fed                           44,985          50,000         5,015
   180      Tax - State                         20,287          21,000           713
   190      Tax - SDI                            1,470           1,500            30
  See more online: Apply Data Validation to cells
                                              Limit users to entries between 100-999
             Cost Centers
 This example limits users to Cost Center
entries from 100-999 in range A4:A12.
 Or look at the next example if you want
to use the list from the Cost Centers
worksheet to set up a list selection.
  Use VLOOKUP to return the
       Category name
                                              Use the Cost Center list instead
 Note the VLOOKUP formula example in
both tables that returns the Category
name based on the Cost Center
entry/selection.
 You can click this to learn more about
VLOOKUP.
Data Validation - Limit users to date entries only
                                                                                   Use the Date option to lim
    Time Off Request
 Start Date     End Date                            Date Entries
  09/12/17      09/17/17               This example limits users to entering a
                                      start date after today by using the
                                      TODAY() function, and an end date after
                                      the start date.
                                                                                   Use the Date option to lim
  See more online: Apply Data Validation to cells
Use the Date option to limit the Start Date
Use the Date option to limit the End Date
Data Validation - Limit users to time entries only
 Start Time     End Time        Meeting Time                    Time Entries
  8:00 AM        5:00 PM           9:30 AM
                                                     This example (cell C4) limits users to
                                                    entering time values between cells A4
                                                    & B4 (8:00 AM and 5:00 PM).
                                                     Note that this example uses
                                                    references to the values in cells A4 & B4
                                                    instead of inputting the values into the
                                                    Data Validation dialog. It's much easier
                                                    to update those values when they're in
                                                    cells.
  See more online: Apply Data Validation to cells
 Use the Start & End Time options to limit Time entries
Data Validation - Limit entries to a certain text length
                                                                                          Text Length Settings
Enter text up to 25 characters                         Limit Text Length
Enter a brief description
                                               This example (cell A4) limits users to
                                              text entries less than 25 characters by
                                              using the "less than or equal to" Data
                                              option.
   See more online: Apply Data Validation to cells
 Text Length Settings
Data Validation - Limit entries to a set value
                                                          Budget                          Limit entrie
                                                                         65,000
Budget Input -- Human Resou                              Maximum
                                                                                         This example (c
                                                                                        to a whole numbe
                                        Current Year     Future Year                    equal to the value
Cost Center Category                                                     Variance
                                         Projected         Budget                        Note that this e
   110      Salary - Regular Wages              63,578          60,000        (3,578)   reference to the v
                                                                                        instead of inputtin
   120      Salary - Hourly Wages               19,721          25,000         5,279    Data Validation d
   130      Salary - Commission                 37,500          40,000         2,500    easier to update t
                                                                                        a cell.
   140      Salary - Bonus                      12,605          25,000        12,395
   150      Salary - Vacation                   28,391          30,000         1,609
   160      Salary - Sick Time                   7,303           8,500         1,197
   170      Tax - Fed                           44,985          50,000         5,015
   180      Tax - State                         20,287          21,000           713
   190      Tax - SDI                            1,470           1,500            30
  See more online: Apply Data Validation to cells
                                            Allow a whole number entry limited to a set value
  Limit entries to a set value
 This example (cell D10) limits users
to a whole number entry less than or
equal to the value in cell E4
 Note that this example uses a
reference to the value in cell E4
instead of inputting the value into the
Data Validation dialog. It's much
easier to update that value when it's in
a cell.
Data Validation - Custom option with a formula to restrict a tex
Product ID    Product Name     Custom Option to restrict a Text entry
ID-1234567    Widget
                              This example uses the Custom option in cells
ID-29876534   Fetzer Valve   A4:A5.
                              In this case the user can only enter a Product ID
                             beginning with the text "ID-" and 9 or more total
                             characters by using the formula:
                             =AND(LEFT(A4,3)="ID-",LEN(A4)>9)
                              Another option would be to use a Custom Number
                             Format from the Format Cells dialog (Ctrl+1) - See
                             the example below.
Data Validation - Custom option with a formula to ensure a tex
Product ID    Product Name    Custom Option to ensure a Text entry
ID-1234567    Widget
                              This example uses the Custom option in cells
ID-29876534   Fetzer Valve   B22:B23.
                              In this case the user can only enter a Product
                             Name that is text, so it can't be just numeric:
                             =ISTEXT(B22)
Custom Number Format
                                        Custom Number Format
Product ID    Product Name
                              Another option for the Product ID would be to
ID-1234567    Widget         use a Custom Number Format from the Format
                             Cells dialog (Ctrl+1) to automatically display the
                             "ID-" text, and allow the user to only enter the
                             actual Product ID numbers. Note that the text "ID-"
                             isn't actually part of the Product ID, it's just
                             displayed for you.
                                                               Custom Number Format
                                                     Another option for the Product ID would be to
                                                    use a Custom Number Format from the Format
ID-29876534    Fetzer Valve                         Cells dialog (Ctrl+1) to automatically display the
                                                    "ID-" text, and allow the user to only enter the
                                                    actual Product ID numbers. Note that the text "ID-"
                                                    isn't actually part of the Product ID, it's just
                                                    displayed for you.
                                                     Custom Format - "ID-"#######
                                                     You could still use Data Validation to limit the
                                                    overall Text entry length however.
  See more online: Apply Data Validation to cells
restrict a text entry
             Custom option for Product ID entry
ensure a text entry
             Custom option to ensure a Text (non-numeric only) entry
             Custom Number format
Data Validation - Custom format to verify age requirement
     Does a participant meet an age                               Custom Option
             requirement?
                                                      This example uses the Custom option in cell
Age Limit:                           18              B6 to determine if a participant meets a set
Must be born before:           09/16/99              age requirement.
Birthday:                      01/15/96               In this case the user can only enter an
                                                     employee age that is greater than 18 (this can
Current Age:                         21.67           be changed in cell B4).
                                                     =IF(B6<=(TODAY()-(365*B4)),TRUE,FALSE)
                                                      This formula uses TRUE/FALSE arguments to
                                                     evaluate the entries. If the condition is TRUE,
                                                     then Data Validation will allow the entry to be
                                                     confirmed, otherwise it will be rejected.
   See more online: Apply Data Validation to cells
equirement
              Custom option to verify age requirement
Data Validation - Custom option to ensure Unique entries only
Unique List                  Custom Option - Unique Entries Only                   Custom option to ensure U
              1
                             This example uses the Custom option for cells
              2             A4:A12
              3
                             In this case the user can only enter a value that
              4             has not already been entered in the range.
              5
                            =COUNTIF($A$4:$A$12,A4)=1
              6
              7              This formula counts the number of times each
                            entry has been made and will only allow it if it's
              8             been entered once (unique), otherwise Data
              9             Validation will reject it.
   See more online: Apply Data Validation to cells
que entries only
 Custom option to ensure Unique entries only
Data Validation - Custom option for e-mail address validation
E-Mail Address                 Custom Option - E-Mail validation                   Custom option for e-mail ad
[email protected]                               This example (cell A4) uses the Custom
                              option to validate an e-mail address entry.
                               In this case the user can only enter a value
                              that includes the @ symbol for an e-mail
                              address. It's not a perfect validation method,
                              but it should work for most cases.
                              =ISNUMBER(FIND("@",A4))
                               This formula uses the FIND function to look
                              for the @ symbol in the text entry. If it exists,
                              then FIND will return a number, which is the
                              @ symbol's position in the text string and
                              allow the entry to pass. If the @ symbol isn't
                              found, then the fomula will return an error,
                              which ISNUMBER will force Data Validation to
                              reject.
  See more online: Apply Data Validation to cells
dress validation
 Custom option for e-mail address validation