Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to create running total in an Excel Table
  • How to calculate average last N values in a table in Excel
  • How to create a Histogram in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How to combine 2 or more chart types in a single chart in Excel

References

  • Basic INDEX MATCH approximate in Excel
  • How to use Excel ROW Function
  • How to get last row in text data in Excel
  • Count unique text values with criteria
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation date in specific year
  • Excel Data validation unique values only
  • Excel Data validation must contain specific text
  • Data validation must not exist in list

Excel Data validation must contain specific text

by

How to set criteria in Excel to accept specific text.

To allow only values that contain a specific text string, you can use data validation with a custom formula based on the FIND and ISNUMBER functions.

Formula

=ISNUMBER(FIND("txt",A1))

Explanation

In the example shown, the data validation applied to C5:C9 is:

=ISNUMBER(FIND("XST",C5))

Note: Data validation rules are triggered when a user adds or changes a cell value.

How this formula works

In this formula, the FIND function is configured to search for the text “XST” in cell C5. If found, FIND will return a numeric position (i.e. 2, 4, 5, etc.) to represent the starting point of the text in the cell. If the text is not found, FIND will return an error. For example, for cell C5, FIND will return 5, since “XST” starts at character 5.

The result returned by the FIND function is then evaluated by the ISNUMBER function. For any numeric result returned by FIND,  ISNUMBER will return TRUE and validation will succeed. When text isn’t found, FIND will return an error, ISNUMBER will return FALSE, and the input will fail validation.

Must not contain

To validate input only when a cell does not contain specific text, you can replace the ISNUMBER function with ISERROR like this:

=ISERROR(FIND("XST",C5))

This formula will return TRUE when “XST” is not found, and data validation will succeed.

Note: Cell references in data validation formulas are relative to the upper left cell in the range selected when the validation rule is defined, in this case C5.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use Excel FALSE Function
  • IF with boolean logic in Excel
  • Return blank if in Excel
  • IF, AND, OR and NOT Functions Examples in Excel
  • Not Equal To ‘<>‘ operator in Excel

Date Time

  • Convert Excel time to decimal seconds
  • Display Days in month in Excel
  • Get last working day in month in Excel
  • Get month from date in Excel
  • How to calculate quarter from date in Excel

Grouping

  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into 3 hour buckets in Excel
  • Group numbers at uneven intervals in Excel
  • Map inputs to arbitrary values in Excel

General

  • How to generate random times at specific intervals in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • Flash Fill in Excel
  • Delete Blank Rows at Once in Excel
  • Count cells that do not contain errors in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning