Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default IF - looking in a cell for a specific value

In an IF statement, what do I need to write to say that if cell A1 contains
"fred", (i.e. " * fred * ") then.. "Yes".
(I'm not sure what operator is needed to say 'contains')

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF - looking in a cell for a specific value

Perhaps


=IF(ISERROR(SEARCH("Fred",A1)),"Not there","There")

Mike


"Sarah (OGI)" wrote:

In an IF statement, what do I need to write to say that if cell A1 contains
"fred", (i.e. " * fred * ") then.. "Yes".
(I'm not sure what operator is needed to say 'contains')

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default IF - looking in a cell for a specific value

On Nov 30, 10:15 pm, Sarah (OGI)
wrote:
In an IF statement, what do I need to write to say that if cell A1 contains
"fred", (i.e. " * fred * ") then.. "Yes".
(I'm not sure what operator is needed to say 'contains')

Any ideas?


=IF(COUNTIF(A1,"*fred*")0,"Yes","No")

Ken Johnson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 63
Default IF - looking in a cell for a specific value

Try is with

=IF(SEARCH("fred";A1)0;"YES";"NO")

greetz


"Sarah (OGI)" schreef in bericht
...
In an IF statement, what do I need to write to say that if cell A1
contains
"fred", (i.e. " * fred * ") then.. "Yes".
(I'm not sure what operator is needed to say 'contains')

Any ideas?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default IF - looking in a cell for a specific value

=IF(NOT(ISERROR(FIND("fred",A2))),"Yes","No")

or

=IF(ISERROR(FIND("fred",A1)),"No","Yes")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Sarah (OGI)" wrote in message ...
| In an IF statement, what do I need to write to say that if cell A1 contains
| "fred", (i.e. " * fred * ") then.. "Yes".
| (I'm not sure what operator is needed to say 'contains')
|
| Any ideas?


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
Not allowing to continu unless a specific cell has specific answer madubois9 Excel Discussion (Misc queries) 3 October 25th 07 12:45 AM
Link to specific cell in specific Excel file JeroenM Excel Discussion (Misc queries) 3 July 6th 07 10:08 AM
Link from a specific Cell in Excel to a specific para. in Word CathyK Excel Worksheet Functions 0 August 10th 06 04:40 PM
Highlight a row if a specific cell is specific numbers/words sea0221 Excel Worksheet Functions 2 March 9th 05 12:06 AM
How do I make a cell date specific to input a value on a specific. ebuzz13 Excel Discussion (Misc queries) 1 January 18th 05 05:53 PM


All times are GMT +1. The time now is 02:49 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"