Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Vstein
 
Posts: n/a
Default How do I perform a contains function for a specific cell?

I am wanting to do an if statement. If cell A contains "a certain word" then
Y else N. what is the syntax for the the contains portain of the if
statement?
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Vstein wrote:
I am wanting to do an if statement. If cell A contains "a certain word" then
Y else N. what is the syntax for the the contains portain of the if
statement?


Some example idioms...

=ISNUMBER(SEARCH(" "&E2&" "," "&A2&" "))+0

=ISNUMBER(FIND(" "&E2&" "," "&A2&" "))+0

=COUNTIF(A2,"*"&E2&"*")

Custom format the formula cell as:

[=0]"N";[=1]"Y"
  #3   Report Post  
KL
 
Posts: n/a
Default

Hi,

Try these:

case sensitive
=IF(ISERROR(FIND("YourString",A1)),"No","Yes")
=IF(SUBSTITUTE(A1,"YourString","")=A1,"No","Yes")

not case sensitive:
=IF(COUNTIF(A1,"*YourString*"),"Yes","No")
=IF(ISERROR(SEARCH("YourString",A1)),"No","Yes")

Regards,
KL



"Vstein" wrote in message
...
I am wanting to do an if statement. If cell A contains "a certain word"
then
Y else N. what is the syntax for the the contains portain of the if
statement?



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
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
How do I perform a "Countif" function for Two Columns? Syed Ali Zubair Excel Worksheet Functions 2 February 8th 05 08:46 AM


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

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"