Answers for "excel if value in range then return text"

1

excel if range of cells contains specific text

The Generic Formula:

=COUNTIF(rng,"*"&value&"*")>0

EXAMPLE FOR THIS FORMULA:

=COUNTIF(rng,"*"&D5&"*")>0

With 'IF' included:

=IF(COUNTIF(range,"*"&value&"*"),"Yes","No")

The second method:

=ISNUMBER(SEARCH(substring,text))

EXAMPLE FOR THIS FORMULA:

=ISNUMBER(SEARCH(C5,B5))

Case sensitive version:

=ISNUMBER(FIND(substring,text))

EXAMPLE:

=IF(ISNUMBER(SEARCH(substring,text)), "Yes", "No")

If you would like to be extremely specific:

=ISNUMBER(SEARCH("apple",A1))

What this does (^) is searches for how many times the word 'apple' occurs in cell A1.
Posted by: Guest on March-05-2021

Code answers related to "excel if value in range then return text"

Browse Popular Code Answers by Language