To use this function, choose .
Identifies the initial position of a string of text within another string of text. Search is similar to Find, except that Search is not case-sensitive; for example, it does not distinguish between b and B.
SEARCH(find_text,within_text,[start_num])
For find_text, specify the text string you want to find. For within_text, specify the column of text to search. By default, Minitab searches from the first position of each text entry. You can also specify a different initial position (the location in the string from where to start the search) by inserting a number for start_num, the optional third argument of the function.
You can use an asterisk (*) as a wildcard character that represents a string of one or more characters. The question mark (?) is also a wildcard character, but it represents only one character instead of a string of characters. To reference the "*" or "?" character within a text string, use the tilde (~) before the symbol.
Column | Calculator expression | Result |
---|---|---|
C1 contains "234B75" | SEARCH("b7",C1) | 4 (because B7 begins at the 4th position in the text) |
C1 contains "depreciate" | SEARCH( "c*t",C1) | 6 |
C1 contains "Item# C-222-T" | SEARCH( "c*t",C1) | 7 |
C1 contains "defective" | SEARCH( "c*t",C1) | 5 |
C1 contains "814*231*2682" | SEARCH( "~*",C1) | 4 |