Note: The other languages of the website are Google-translated. Back to English
English English

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

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.

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. Full Feature Free Trial 30-day!
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

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:


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


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!

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. Full Feature Free Trial 30-day!
ad prevent typing duplicates


Related Article:

How to limit cell value entries in Excel?


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom

Comments (53)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is really helpful, is there anyway to make this count spaces too?
This comment was minimized by the moderator on the site
The data validations to limit text length input are clear, but unfortunately validations stop the moment you copy text from another field which exceeds the max in the target field. Can that be prevented in some way? Would appricate userful respons!
This comment was minimized by the moderator on the site
Use text to column, choose fixed width and choose the character count you want. It will separate antything above the limit to a new column that you can delete.
This comment was minimized by the moderator on the site
Can you provide some instructions? Not sure how to accomplish what you are saying. What does "text to column" mean?
This comment was minimized by the moderator on the site
It's not feasible @ end user is using the sheet.
This comment was minimized by the moderator on the site
Thanks for the information. Is it possible to limit existing text in a column to 30 characters and erase everything that exceeds that limited amount of characters? Thank you
This comment was minimized by the moderator on the site
Use text to column, choose fixed width and choose the character count you want. It will separate antything above the limit to a new column that you can delete.
This comment was minimized by the moderator on the site
Really helpful. thanks a lot :-)
This comment was minimized by the moderator on the site
Thank you! Very helpful!
This comment was minimized by the moderator on the site
This was great, nice step by step instructions!
This comment was minimized by the moderator on the site
Is it possible to use this with a scanner for barcode? After the scan is done (X digits) can "enter" be done automatically so it will positionned itself in the next cell so I can scan lots of items without to manually press enter ? Any help will be welcome, I don't have any idea how to resolve this.
This comment was minimized by the moderator on the site
Is it possible to set a data validation on a cell containing a concatenate formula? I am concatenating several cells' values and would like to warn the individual entering data if the count exceeds 50 characters. However, I don't want to use the =LEFT function as I need the user to edit his input values, rather than have Excel only return the first 50 characters. Any ideas?
This comment was minimized by the moderator on the site
use the following formula: =LEFT(cell #,# of characters you want to limit the field down to) Example: =LEFT(C1,30)
This comment was minimized by the moderator on the site
Thank you so much! This is exactly what I needed!!
This comment was minimized by the moderator on the site
in the next cell i need the characters from 31 to 60. so wat is the formala for that??? plz guide me
This comment was minimized by the moderator on the site
thanks amazing
This comment was minimized by the moderator on the site
I need to limit numerical inputs to show just the last 5 characters regardless of string size. can this be done in Excel?
This comment was minimized by the moderator on the site
This design is incredible! You obviously know how to keep a reader amused. dakgffedggeddgfe
This comment was minimized by the moderator on the site
Very helpful, easy to learn. This was great, nice step by step instructions. Thank you.
This comment was minimized by the moderator on the site
while converting txt to excel if the txt file contain a cell value more than 15 characcter it is rounding off. is there any formulat that helps to rpevent this.
This comment was minimized by the moderator on the site
Really Helpful... thank you very much
This comment was minimized by the moderator on the site
Really very Helpful....... thank you very much
This comment was minimized by the moderator on the site
I want to make sure that the cell is not empty. User can type another value, but shouldn't be able to delete it. I used text length, given that it has to be min. 1 character. I have set input message and error alert as well. Doesn't work. Tried with ticking ignore bland and without it as well. No luck. You can still delete the value. (If I use "less than", that works fine with message and alert.)
This comment was minimized by the moderator on the site
I have used the data validation to set a character limit. However, if the limit is exceeded and the warning message appears, you can just press cancel with no consequence. How do I prevent this?
This comment was minimized by the moderator on the site
thanks!! it helps me a lot!! :lol:
This comment was minimized by the moderator on the site
I tried this but my entries have a combination of numbers and letters and many begin with a number. This will make all that begin with a number as invalid. How do I keep this from happening?
This comment was minimized by the moderator on the site
I'm truly enjoying the design and layout of your blog. It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work! Also visit my weblog - cialis online
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations