+ Reply to Thread
Results 1 to 8 of 8

If statement or Find statement?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-26-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: If statement or Find statement?

    Excellant, both approaches work a treat.

    I now need to join this with another formula that I have.

    I have this formula:

    =IF(ISNUMBER(SEARCH("*hotel*",G2)),"1",IF(ISNUMBER(SEARCH("*motel*",G2)),"1",IF(ISNUMBER(SEARCH("*pork*",G2)),"1",IF(ISNUMBER(SEARCH("*beef*",G2)),"1",IF(ISNUMBER(SEARCH("*chicken*",G2)),"1",IF(ISNUMBER(SEARCH("*lamb*",G2)),"1",IF(ISNUMBER(SEARCH("**",F2)),"1",IF(ISNUMBER(SEARCH("**",F2)),"","")))))

    this is saying inthe cell where you are picking up "Coffee", if it says Hotel, Motel, pork, beef, chicken, lamb then bring back 1.

    Is there a way of joining the 2 together, as I need this hierarchy to sort the importance of servicing by company!!

    Cheers for your help

    Donna

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: If statement or Find statement?

    Can you explain the last two terms in your expression, i.e.:

    ...,IF(ISNUMBER(SEARCH("**",F2)),"1",IF(ISNUMBER(SEARCH("**",F2)),"","")))))

    as these seem to be the same condition. How does G2 and F2 relate to the other cells in your sample workbook? Do you really want the text value "1" returned, or should it be the number 1?

    Pete

+ 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