Test if a cell contains 1 text string

You can check if a cell contains a particular text string by combining the ISNUMBER and SEARCH functions.
The SEARCH function is not case sensitive.
You can replace the SEARCH function with the FIND function if you want a case sensitive search.


 A
1=ISNUMBER(SEARCH("tt", "better")) = -1
2=ISNUMBER(SEARCH("t?e", "better")) = -1
3=ISNUMBER(SEARCH("TT", "better")) = -1
4=ISNUMBER(FIND("TT", "better")) = 0

1 - Does the substring "tt" exist in the string "better".
2 - Does the substring with wildcard characters "t?e" exist in the string "better".
3 - Does the substring "TT" exist in the string "better".
4 - Does the substring "TT" exist in the string "better".


Built-in Functions

FIND - The starting position of a substring within a larger text string (case sensitive).
ISNUMBER - The boolean True or False depending if the value is a number.
ISTEXT - The boolean True or False depending if the value is text.
SEARCH - The starting position of a substring within a larger text string (not case sensitive).


User Defined Functions

CONTAINS


Related Formulas

Test if a cell contains 2 text strings
Test if a cell contains 1 word
Test if a cell contains 2 words


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top