#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default IF question

I am attempting an IF lookup for a list of cells that have letters in them. I
know how to say IF the cell equals (=) a certain letter, but is there a way
to say IF the cell contains a certain letter?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default IF question

=if(isnumber(search("a",a1)),"A1 contains an a","nope")

If you want to match case, then use =Find() instead of =search()

And another way if you don't care about upper/lower case:
=if(countif(a1,"*a*")0,"yep","nope")


Alyssa wrote:

I am attempting an IF lookup for a list of cells that have letters in them. I
know how to say IF the cell equals (=) a certain letter, but is there a way
to say IF the cell contains a certain letter?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default IF question

You'll want to use either FIND (case-sensitive) or SEARCH(non-case-sensitive)

For instance, if A1 = "This is a test"
and A2 = "is"
=IF(ISNUMBER(SEARCH(A2,A1)),"Text found","Not found"
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Alyssa" wrote:

I am attempting an IF lookup for a list of cells that have letters in them. I
know how to say IF the cell equals (=) a certain letter, but is there a way
to say IF the cell contains a certain letter?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
If then question Sung Excel Discussion (Misc queries) 3 August 23rd 07 06:00 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
VBA Question Frank Rudd via OfficeKB.com Excel Discussion (Misc queries) 3 June 23rd 05 11:15 PM


All times are GMT +1. The time now is 07:08 AM.

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

About Us

"It's about Microsoft Excel"