+ Reply to Thread
Results 1 to 5 of 5

Returning Value if cell contains certain word/phrase

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Returning Value if cell contains certain word/phrase

    Hello,

    So I need to get a formula that checks to see if a cell in a certain column contains the phrase "SUPP" somewhere within the text in the cell, and if it does, return the value 1. And if it does not returns the value 2. Any suggestions?

    Thanks in advance!

    Rob

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Returning Value if cell contains certain word/phrase

    How about..

    =IF(ISERROR(SEARCH("SUPP",A1)),2,1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-29-2010
    Location
    Indiana
    MS-Off Ver
    Excel 2003, 2010, 2013
    Posts
    51

    Re: Returning Value if cell contains certain word/phrase

    If you want to check all the cells in a column, try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Just change the A:A to your column letter of interest.

  4. #4
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Returning Value if cell contains certain word/phrase

    Works perfect, thanks!

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Returning Value if cell contains certain word/phrase

    Another option....
    =2-COUNTIF(A1,"*SUPP*")
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1