Log in
x
or
x
x
Register
x

or

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


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

Be the first to comment.