A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

IF a cell contains specific text



 
 
Thread Tools Display Modes
  #1  
Old February 11th 08, 02:50 PM posted to microsoft.public.excel.misc
Christine
external usenet poster
 
Posts: 147
Default IF a cell contains specific text

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")
Ads
  #2  
Old February 11th 08, 02:58 PM posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
 
Posts: 10,124
Default IF a cell contains specific text


Look in the help index for FIND & SEARCH. Then use within an IF formula
if(>0,1,2)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"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")


  #3  
Old February 11th 08, 03:28 PM posted to microsoft.public.excel.misc
Roger Govier[_3_]
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")


  #4  
Old February 11th 08, 03:43 PM posted to microsoft.public.excel.misc
Christine
external usenet poster
 
Posts: 147
Default IF a cell contains specific text

I LOVE Excel! Thank you very much, Mr. Guillett.

"Don Guillett" wrote:

>
> Look in the help index for FIND & SEARCH. Then use within an IF formula
> if(>0,1,2)
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
>
> "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")

>
>

  #5  
Old February 11th 08, 03:46 PM posted to microsoft.public.excel.misc
Bob I
external usenet poster
 
Posts: 2,819
Default IF a cell contains specific text

Perhaps use this?
=IF(ISERR(FIND("Not mapped",G4)),"Something else","Disregard")

Christine wrote:

> 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")


  #6  
Old February 11th 08, 05:41 PM posted to microsoft.public.excel.misc
Ron Coderre
external usenet poster
 
Posts: 2,118
Default IF a cell contains specific text

Try this:

=IF(COUNTIF(G4,"*Not mapped*"),"Disregard","Something else")

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"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")



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cell location containing specific text Gregg R Excel Worksheet Functions 8 April 9th 07 09:25 PM
How do I set repeating text for a specific cell. Ronald Excel Worksheet Functions 0 April 28th 06 05:27 AM
copy text to specific cell Tattyfur Excel Discussion (Misc queries) 1 January 5th 06 05:21 PM
How do I search for specific text and sum the cell to the right? PacRat2001 Excel Worksheet Functions 3 October 12th 05 04:21 AM
Counting specific text in a cell Steve Excel Worksheet Functions 7 January 26th 05 05:51 PM


All times are GMT +1. The time now is 10:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.