KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to allow only certain values or characters in Excel?

AuthorSunLast modified

Excel can restrict what users enter in selected cells, but the correct method depends on whether you want to allow only specific complete values or only specific characters. This article shows how to create a list of permitted values with Data Validation and how to restrict entries to selected characters with Kutools for Excel.

Comparison of methods for restricting entries

MethodWhat it restrictsExampleBest for
Data ValidationAllows only complete values from a predefined list.An entry must be exactly Approved, Pending, or Rejected.Status fields, categories, departments, and other fixed choices.
Kutools for ExcelAllows entries containing only the specified characters.If ABCDE is allowed, users can enter AB, DE, or ABCDE.Codes and IDs that must use a limited character set.

Allow only certain values with Data Validation

Excel's Data Validation feature can limit entries to the complete values stored in a source list.

  1. Enter the values you want to allow in a range of cells.
    Enter the values that users are allowed to input
  2. Select the cells in which you want to restrict entries, and click Data > Data Validation.
    Data Validation button on the Data tab
  3. In the Data Validation dialog box, on the Settings tab, select List from the Allow list. In the Source box, click the range-selection button Range-selection button and select the list created in the first step.
    Configure a list in the Data Validation dialog box
  4. Click OK. Users can now select or type only a value that exactly matches an item in the source list.
    Only values from the list are accepted

    If a user enters a value that is not in the list, Excel displays an error alert and rejects the entry.

    Error alert displayed for a value that is not in the list

Allow only certain characters with Kutools for Excel

If users need to enter different combinations of a limited set of characters, use the Prevent Typing feature in Kutools for Excel. For example, you can allow the letters A, B, C, D, and E without limiting users to a predefined list of complete values.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...
  1. Select the cells you want to restrict, and click Kutools > Prevent Typing > Prevent Typing.
    Prevent Typing option on the Kutools tab
  2. In the Prevent Typing dialog box, select Allow to type in these chars. Enter the permitted characters directly in the box below, such as ABCDE, and select Case sensitive if uppercase and lowercase letters should be treated differently.

    📝 Note:

    This feature has been updated. You no longer need to separate characters with commas. Enter the allowed characters directly, such as ABCDE.

    Specify the characters allowed by Prevent Typing
  3. Click OK. A message warns that applying this feature will remove existing Data Validation rules from the selected range. Click Yes to continue, and then click OK in the confirmation message.
    Data Validation removal warning and confirmation message
  4. The selected cells now accept only the specified characters. In this example, users can enter combinations of A, B, C, D, and E, but other characters are rejected.
    Only the specified characters can be entered

    📝 Note:

    If Case sensitive is cleared, both uppercase and lowercase versions of the specified letters are allowed. For example, entering ABCDE also permits abcde.


Video: Allow only certain characters

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy AI-powered features for smarter and faster work! Download Now!

Frequently asked questions

What is the difference between allowing certain values and allowing certain characters?

Allowing certain values requires the entire cell entry to match an item in a list. Allowing certain characters lets users create different entries, but every character used must belong to the permitted character set.

Can users type a Data Validation list value instead of selecting it?

Yes. Excel accepts a typed entry when it exactly matches one of the values in the source list.

Why can an invalid value appear after data is pasted?

Some paste operations can bypass or overwrite Excel Data Validation. Review pasted data afterward or use stronger entry protection when pasted values must also be controlled.

How can I allow letters, numbers, and a hyphen with Kutools?

Enter all permitted characters directly in the box, for example ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-. Enable Case sensitive if lowercase letters should remain blocked.

Will Kutools Prevent Typing remove existing Data Validation?

Yes. Kutools displays a warning before removing Data Validation rules from the selected range. Review those rules before you continue.

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 Toolsets:  12 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!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in