View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default IF a cell contains specific text

Hi Christine
Try
=IF(ISNUMBER(SEARCH("Not Mapped",G4)),"Disregard","Something Else")

Search is not case sensitive, so "not mapped" would be found as well.
FIND() is case sensitive, so substitute that if you want a case sensitive
search

You nee the ISNUMBER() function as well, because both Search and Find return
the position on the string, an will give a #N/A error if the string is not
found.

EXACT() tests to see if the string is exactly the same, and returns True or
False, so the Isnumber part would not be needed.
=IF(EXACT("NOt MaPPed",G7),"Disregard","Something Else")
would look for the mixture of upper case and lower case letters in the cell
being exactly the same as type in the formula.
--
Regards
Roger Govier

"Christine" wrote in message
...
Is there a way to include in a formula a command that will check if a cell
contains a specific string of text? For example, if cell G4 contains "Not
mapped" (and more text), then "Disregard" will be indicated in cell C4 -
IF(G4 contains "Not mapped","Disregard","Something else")