Excel Guides

Specifying a Data Validation Error Message in Excel

When you create a data validation rule in Excel, you can specify an error message to display when the rule is violated. This can be helpful in ensuring that your users enter the correct type of data in a cell.

To specify an error message, follow these steps:

  1. Select the cell or range of cells that you want to apply data validation to.
  2. On the Data tab, in the Data Tools group, click Data Validation. The Data Validation dialog box appears.
  3. Under Settings, do one or more of the following:
    • Allow: Specifies the type of data that you want to allow in the cell or range. You can select any of the following options:

    • (Blank): No restriction. Data validation is not applied.

    • (Custom): Specifies a formula that must be true for data validation to pass. For more information about using formulas for data validation, see the "Formulas" section later in this article.

    • (Date): Requires a date or date and time value in mm/dd/yyyy or mm/dd/yyyy hh:mm format, where mm is the month, dd is the day, yyyy is the year, and hh is the hour on a 24-hour clock.

    • (Decimal): Requires a decimal value. Negative numbers are allowed by default. To disallow negative numbers, clear the (-) check box under (Decimal). By default, decimals are rounded to two decimal places. To change this setting, select a different value in the Decimal places box under (Decimal). You can also specify minimum and maximum values allowed by selecting values in the Min and Max boxes under (Decimal). If you want to allow only integer values (no decimals), select 0 in the Decimal places box.

    • "The value you entered is not valid. A decimal number with at most two decimal places is required." This error message appears if you try to enter a value that does not meet all three of these conditions: it must be a decimal number (no letters or symbols), it cannot have more than two decimal places, and it cannot be blank.


Move beyond 


Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.