
=ISNUMBER(FIND("txt",A1))Related formulas
Data validation allow numbers only
Data validation allow text only
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.
In the example shown, the data validation applied to C5:C9 is:
=ISNUMBER(FIND("XST",C5))
Data validation rules are triggered when a user adds or changes a cell value.
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.) for the starting point of the text in the cell. If the text is not found, FIND will return an error. For 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, the ISNUMBER function 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.
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.

=ISNUMBER(FIND("txt",A1))Related formulas
Data validation allow numbers only
Data validation allow text only
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.
In the example shown, the data validation applied to C5:C9 is:
=ISNUMBER(FIND("XST",C5))
Data validation rules are triggered when a user adds or changes a cell value.
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.) for the starting point of the text in the cell. If the text is not found, FIND will return an error. For 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, the ISNUMBER function 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.
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.