+ Reply to Thread
Results 1 to 4 of 4

How do I specify value IF cell contains word, but that word is not the ONLY word?

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    1

    How do I specify value IF cell contains word, but that word is not the ONLY word?

    How do i write an If function that will specify a certain value if a given cell contains a specific word, but that word is not necessarily the ONLY word in that given cell?

    For instance:
    If cell B1 has "transfer" in it the cell B4 must be "0", otherwise "1"
    If cell B1 has 'credit card" in it, then cell B4 must be "0", otherwise "1"
    such that if B1 said "Transfer to Bank Account", that would qualify to generate a "0" as well?

    Thank you,

    R

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: How do I specify value IF cell contains word, but that word is not the ONLY word?

    Try =--(Isnumber(FIND("word", B1))=False())

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How do I specify value IF cell contains word, but that word is not the ONLY word?

    Maybe

    =NOT(OR(B1={"Transfer","Credit Card","Transfer to Bank Account"}))*1

  4. #4
    Registered User
    Join Date
    05-17-2012
    Location
    Midwest USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: How do I specify value IF cell contains word, but that word is not the ONLY word?

    The way I have found to look for and/or count a word in the cell that is not the only word is put * at the beginning and end of the word your looking, for your exsample
    =if(B1="*Transfer*", 0, 1) will return a results you requested, if you just need a count use =countif(range, "*Transfer*") and that will count all instances of transfer in the range. it is not case sensitive for the check.
    Last edited by Otaliema; 05-17-2012 at 09:50 AM. Reason: grammer

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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