Skip to main content

How to limit characters length in an Excel cell?

Author: Kelly Last Modified: 2024-11-18

A cell in Excel can hold a maximum of 32,767 characters, with only 1,024 characters displayed and all 32,767 visible in the Formula bar. However, you might sometimes need to restrict user input to a certain number of characters in a cell, such as limiting it to 10 characters. This tutorial will show you how to effectively limit the number of characters in an Excel cell.


Limit the number of characters in a cell

This section covers the steps to restrict the number of characters that can be entered into a specific cell or range of cells.

  1. Select the cell range where you want to enforce the character length limit.
  2. Click Data Validation in the Data Tools group under the Data tab.
    Click Data Validation under the Data tab
  3. In the Data Validation dialog box, please set the validation rule as follows:
    set the validation rule in the dialog box
    1. From the Allow: drop-down menu, select Text Length.
    2. From the Data: dropdown, select the criteria based on your requirements:
      1. Choose the equal to option for an exact character count, e.g., 10 characters.
      2. Select less than or equal to for a maximum character limit, e.g., up to 10 characters.
      3. Opt for greater than for more than a specific count, e.g., more than 10 characters.
        select the criteria from data drop down
    3. In the Maximum/Minimum/Length: box, input the desired number for the character limit according to your needs.
  4. Click OK.

Now, users will be restricted to input text within the set character limits in the selected cells.

Easily prevent from typing special characters, numbers, or letters in a cell/selection in Excel

With Kutools for Excel's Prevent Typing feature, you can easily limit character types in Excel cells or selections.
A. Block entry of special characters like *, !, etc.;
B. Restrict typing of specific characters, such as numbers or certain letters;
C. Only allow typing in specified characters, such as numbers or letters, as you need.
prevent typing chars by kutools

Set Input Message for informing character limit

Here, we'll explain how to set up input messages that inform users about the character limitations before they begin typing as below screenshot shown:
Set Input Message for informing character limit

  1. Select the cells where you will add an input message.
  2. Click Data Validation in the Data Tools group under the Data tab.
    Click Data Validation under the Data tab
  3. In the Data Validation dialog box, select the Input Message tab, and do as follows:
    1. Check the Show input message when cell is selected option.
    2. Enter the message title and message content.
      specify the options in the dialog box
  4. Click OK.

Now, when you click on a cell where the input message is configured, a tooltip will appear, displaying the message title and content you entered earlier.


Activate Error Alert for character limit violations

This section will guide you through configuring error alerts in Excel, designed to immediately notify users when the entered data does not meet the specified character limit. See screenshot:
Activate Error Alert for character limit violations

  1. Select the cells where you want to activate an error alert for instances of invalid data entry.
  2. Click Data Validation in the Data Tools group under the Data tab.
    Click Data Validation under the Data tab
  3. In the Data Validation dialog box, select the Error Alert tab, and do as follows:
    1. Check the Show error alert after invalid data in entered option.
    2. Select the Warning option from the Style: drop-down box.
    3. Enter the alert title and error message.
      select the Error Alert tab and set the rule
  4. Click OK.

From now on, if the text entered in a cell is invalid, such as exceeding 10 characters, a warning dialog box will appear, displaying the preset alert title and message.


Demo: Limit character length in cells with input message & alert warning

 

One click to prevent from entering duplicate data in a single column/list

Kutools for Excel's innovative Prevent Duplicate utility provides Excel users with the convenience of effortlessly preventing duplicate entries in a list or column. With just a single click, this powerful tool ensures data integrity and accuracy in your spreadsheets.
ad prevent typing duplicates

Related Article:

How to limit cell value entries in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!