Forum Discussion
TEXT EXTRACTION
- Jul 05, 2023
Is this what you are looking for?
=IF(ISNUMBER(SEARCH("SDX65",A2)), "SDX65", IF(ISNUMBER(SEARCH("SDX70",A2)), "SDX70", ""))
Replace SEARCH with FIND, especially if you want a case-sensitive search.
-----
Alternatively:
=IFERROR(MID(A2,SEARCH("SDX??",A2),5), "")
returns any 5-character string that begins with "SDX" (or "sdx" or any combination of mixed case).
Note that we cannot use FIND (for a case-sensitive search) here because FIND does not allow wildcard characters like "?".
HiDetlef_Lewin , Can you please share the formula to achieve this using IF+FIND or IF+SEARCH option?
Br,
Anupam
Is this what you are looking for?
=IF(ISNUMBER(SEARCH("SDX65",A2)), "SDX65", IF(ISNUMBER(SEARCH("SDX70",A2)), "SDX70", ""))
Replace SEARCH with FIND, especially if you want a case-sensitive search.
-----
Alternatively:
=IFERROR(MID(A2,SEARCH("SDX??",A2),5), "")
returns any 5-character string that begins with "SDX" (or "sdx" or any combination of mixed case).
Note that we cannot use FIND (for a case-sensitive search) here because FIND does not allow wildcard characters like "?".
- anupambit1797Jul 05, 2023Iron ContributorThanks Joe, this is indeed a Very useful info between search and find..