Skip to main content

How to limit entries to only allow values that start/End with certain texts in Excel?

This tutorial explains how to use data validation to allow only values that begin with or end with certain characters in Excel.

Only allow texts that start or end with certain characters in cells
More tutorials for Data validation...


Only allow texts that start or end with certain characters in cells

Please do as follows to only allow texts that start or end with certain characters in cells in Excel.

1. Select the range of cells that you only allow texts that start or end with certain characters.

2. Click Data > Data Validation > Data Validation. See screenshot:

3. In the Data Validation dialog box, please configure as follows.

  • 3.1 Select Custom from the Allow drop-down list;
  • 3.2 For allowing texts that start with certain characters, please copy the below formula into the Formula box;
  • =EXACT(LEFT(A2,3),"KTE")
  • And for allowing texts that end with certain characters, please copy the below formula into the Formula box;
  • =EXACT(RIGHT(A2,3),"KTE")
  • 3.3 Click the OK button.

Notes:

  • 1. In the formulas, A2 is the first cell of the selected range; 3 is the number of characters you specified, KTE is the start or end text.
  • 2. These two formulas are case-sensitive.
  • 3. If you don’t need case-sensitive, please apply the below CONTIF formulas:
  • Only allow texts that start with KTE in a range of cells
  • =COUNTIF(A2,"KTE*")
  • Only allow texts that end with KTE in a range of cells
  • =COUNTIF(A2,"*KTE")

4. And then, click OK button. From now on, only the text string begins or ends with the centain characters you specified can be entered into the selected cells.


Related articles

Allow only date format in specific cells
How could you restrict a list of cells to only allow entering date format in Excel worksheet? In this article, we will talk about some interesting tricks for dealing with this job.

Validate email addresses in a column of worksheet
As we all known, a valid email address is composed of three parts, the user name, the "at symbol" (@), and the domain. Sometimes, you just allow others to enter only the email address format text into a specific column of worksheet. Methods in this article will make it possible to achieve in Excel.

Apply data validation to force phone number format in Excel
May be, there are various phone number formats can be used when typing into the Excel workbook. But, how could you only allow one phone number format to be entered in a column of worksheet? For example, I just want the phone number as this format 123-456-7890 to be allowed entering. The methods in this article will do you a favor.

Use data validation to only allow SSN number entered in Excel
For recording the SSN number of all employees and forcing them to type the SSN number in xxx-xx-xxxx format in a column, you can use the Data Validation function to solve the problem.

Three methods to validate cells to only accept IP address in Excel
While using Excel, do you know how to set up a column or a range of cells to only accept IP address format (xxx.xxx.xxx.xxx)? This article provides several methods for you to deal with it.

More tutorials for Data validation...

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

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...

Description


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!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations