Data Validation: Restrict number of text characters that can be entered in cell

  1. Select the cell/cells where you want to apply the data validation.

  2. Select Data → Data Validation. You can also apply data validation to a group of cells, entire rows/columns etc.

    Capture 2019-08-28 at 19.25.42.png

  3. Data Validation dialog appears on the Right. Select the "Text Length" criteria from the drop-down. You can select any available condition from the drop-down (Between, Equal To, etc). 
    In this example, we select the "EqualTo" condition from the dropdown. We want to restrict the cell value to only three characters.

    Capture 2019-08-28 at 19.28.01.png


  4. (Optional) Enter the message for users
    A message that will be displayed when the user hovers over/selects the cell can be entered here.
    If you want to Ignore the blank cells from the data validation, toggle the switch "Ignore Blank Cells" to ON.
    Capture 2019-08-28 at 19.29.32.png

  5. (Optional) Enter Message at input of incorrect values.
    In the lower section of the Dialog, you can choose to display a message when the user enters invalid data. To display an alert, select the "Show Alert" box
    Different Alert types are "Error, Warning and Information". Select the required Alert type, title and the message you want to display.
    Capture 2019-08-28 at 19.30.37.png

  6. Click OK once the values are selected.

  7. Note: Any incorrect values will be circled red and hovering over/selecting the cells will show the input message.
    Capture 2019-08-28 at 19.31.19.png


  8. Note: Entering Incorrect value will show up the error message
    Capture 2019-08-28 at 19.32.00.png

See Also: How to use Data Validation feature