Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default IF cell contains part of text

Want to create an if fuction that will give a result of "Yes" if any part of
the cell cotains 16Z.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: IF cell contains part of text

Sure, you can use the IF function in combination with the SEARCH function to achieve this. Here are the steps:
  1. Select the cell where you want to display the result.
  2. Type the following formula:
    Formula:
    =IF(ISNUMBER(SEARCH("16Z",A1)),"Yes","No"
  3. Replace "A1" with the cell reference of the cell you want to check for the text "16Z".
  4. Press Enter.

The formula will check if the cell contains the text "16Z" and return "Yes" if it does, and "No" if it doesn't. The SEARCH function is used to find the position of the text "16Z" within the cell, and the ISNUMBER function checks if the result is a number (which means the text was found). If the text is found, the IF function returns "Yes", otherwise it returns "No".

Note that this formula is case-sensitive, so it will only find "16Z" and not "16z" or "16zZ". If you want to make it case-insensitive, you can use the FIND function instead of SEARCH and wrap the text to search for in the UPPER function to convert it to uppercase.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF cell contains part of text

Try

=IF(ISERROR(SEARCH("16Z",A1)),"","Yes")

If you want (for example) to say No if it isn't there try

=IF(ISERROR(SEARCH("16Z",A1)),"No","Yes")

If you want it to be case sensitive change SEARCH to FIND


Mike
"Supe" wrote:

Want to create an if fuction that will give a result of "Yes" if any part of
the cell cotains 16Z.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,533
Default IF cell contains part of text

Look at this:

=IF(ISERROR(FIND("16Z",A1)),"No","Yes")

Regards,
Per

"Supe" skrev i meddelelsen
...
Want to create an if fuction that will give a result of "Yes" if any part
of
the cell cotains 16Z.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default IF cell contains part of text

=IF(COUNTIF(A1,"*16z*"),"yes","no")


"Supe" wrote:

Want to create an if fuction that will give a result of "Yes" if any part of
the cell cotains 16Z.

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
copy selected part number of text from one cell into another cell orewa Excel Discussion (Misc queries) 1 April 11th 08 01:30 PM
Get part of text in a Cell Marcha Excel Discussion (Misc queries) 10 March 11th 08 05:04 PM
find text in cell and replace it with part of the text in that ce. jules Excel Discussion (Misc queries) 3 May 3rd 07 10:18 AM
USE PART OF TEXT FROM ONE CELL IN ANOTHER Bob Excel Discussion (Misc queries) 4 December 19th 06 12:23 AM
Display contents of cell in another cell as part of text string? [email protected] New Users to Excel 3 July 8th 06 07:44 PM


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