Log in
x
or
x
x
Register
x

or
0
0
0
s2sdefault

How to limit characters length in a cell in Excel?

Sometimes you may want to limit how many characters a user can input to a cell. For example, you want to limit up to 10 characters can be inputted in a cell. This tutorial will shows you the details to limit characters in cell in Excel.

Limit characters length in a cell

Set Input Message for text length limitation

Set Error Alert for text length limitation

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

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 a cell or selection in Excel. Click for 60-day free trial!
A. Prevent from typing in special characters, such as *, !, etc.;
B. Prevent from typing in certain characters, such as numbers, or certain letters;
C. Only allow to type in certain characters, such as numbers, letters, etc. as you need.
ad prevent typing chars


arrow blue right bubble Limit characters length in a cell

1. Select the range that you will limit date entries with specify character length.

2. Click the Data validation in the Data Tools group under Data tab.

3. In the Data Validation dialog box, select the Text Length item from the Allow: drop down box. See the following screen shot:

4. In the Data: drop down box, you will get a lot of choices and select one, see the following screen shot:

(1) If you want that others are only able to entry exact number of characters, says 10 characters, select the equal to item.
(2) If you want that the number of inputted character is no more than 10, select the less than item.
(3) If you want that the number of inputted character is no less than 10, select the greater than item.

4. Entry exact number that you want to limit in Maximum/Minimum/Length box according to your needs.

5. Click OK.

Now users can only enter text with limited number of characters in selected ranges.

arrow blue right bubble Set Input Message for text length limitation

The Data Validation allows us to set input message for text length limitation besides selected cell as below screenshot shown:

1. In the Data Validation dialog box, switch to the Input Message tab.

2. Check the Show input message when cell is selected option.

3. Entry the message title and message content.

4. Click OK.

Now go back to the worksheet, and click one cell in selected range with text length limitation, it displays a tip with the message title and content. See the following screen shot:


arrow blue right bubble Set Error Alert for text length limitation

Another alternative way to tell user the cell is limited by text length is to set an error alter. The error alert will be shown after you entry invalid data. See screenshot:

1. In the Data Validation dialog box, switch to the Error Alert dialog box.

2. Check the Show error alert after invalid data in entered option.

3. Select the Warning item from the Style: drop down box.

4. Input the alert title and alert message.

5. Click OK.

Now if the text you entered in a cell is invalid, for example it contains more than 10 characters, a warning dialog box will pop up with preset alert title and message. See the following screen shot:


Demo: limit characters length in cells with input message & alert warning

Tip: In this Video, Kutools tab and Enterprise tab are added by Kutools for Excel. If you need it, please click here to have a 60-day free trial without limitation!

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

Comparing to setting data validation one by one, Kutools for Excel's Prevent Duplicate utility supports Excel users to prevent from duplicate entries in a list or a column with only one click. Click for 60-day free trial!
ad prevent typing duplicates


Related Article:

How to limit cell value entries in Excel?


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Eliza · 6 months ago
    [quote name="Ivan"]Hi, do you know how to put exact length limit 10 and when put abc i want from excel to put 8 space?[/quote]
    I want to set a cell to 10 character, when input 2 character then will auto fill up with 8 space after. if the cell is blank, then return with 10 space. this is for setting a excel file for user input and save as txt or cvs file for import to other software
  • To post as a guest, your comment is unpublished.
    ARNAB DEBNATH · 1 years ago
    Hi,
    I have a attendance sheet. from 1 to 31. I put "P" on each cell if person is present.
    Now I want that how many times "P" is continuing present in cell.
    As as example - I have put "P" from 1 to 6 , then from 8th to 9th put P, and 10th is gap. then from 11th its continue to 18th. ...
    now i want how many times P is continue 6 time . PPPPPP PP PPPPPPPP
    Manually the answer is : 2(1to6 = 1,11to18=1)
    If you have any formula to count this it will be a great help.
    • To post as a guest, your comment is unpublished.
      Paul · 11 months ago
      =COUNTIF(B2:B17,">""") this formula will ignore empty cells but will count cells with data in i.e. P
  • To post as a guest, your comment is unpublished.
    Shawn · 1 years ago
    Hi. I want out put txt file and no spaces between cell values. Like 3 cells with First Name, Middle and last. Entered Shawn G Goldman as SHAWNGGOLDMAN
  • To post as a guest, your comment is unpublished.
    Shawn · 1 years ago
    Hi I want few things in a cell. I only want numbers in cell. I want to limit to 10 characters. I want to remove decimal like 15.00 to 1500. I want to indent to right. Also to add 0's to left to make it 10 characters .like 15.00 to 0000001500
  • To post as a guest, your comment is unpublished.
    Praveen · 1 years ago
    Sir, How to set Cells with following Condition
    If one letter will enter go to first cell and 2nd letter automatically goto next cell. How we will set this. Help me.