+ Reply to Thread
Results 1 to 5 of 5

Combining multiple IF statments

  1. #1
    Registered User
    Join Date
    10-07-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Question Combining multiple IF statments

    Hi,
    I want to combine the following list of IF statements, but I have no idea how to do it. I can see tutorials on nesting them, but that isn't what I want to do. Any help gratefully appreciated.
    Cheers,
    Alex.

    =IF(ISNUMBER(SEARCH("*Doubles",J2)), "Doubles","")
    =IF(ISNUMBER(SEARCH("*Minor",J2)), "Minor","")
    =IF(ISNUMBER(SEARCH("*Triples",J2)), "Triples","")
    =IF(ISNUMBER(SEARCH("*Major",J2)), "Major","")
    =IF(ISNUMBER(SEARCH("*Caters",J2)), "Caters","")
    =IF(ISNUMBER(SEARCH("*Royal",J2)), "Royal","")
    =IF(ISNUMBER(SEARCH("*Cinques",J2)), "Cinques","")
    =IF(ISNUMBER(SEARCH("*Maximus",J2)), "Maximus","")
    =IF(ISNUMBER(SEARCH("*Sextuples",J2)), "Sextuples","")
    =IF(ISNUMBER(SEARCH("*Fourteen",J2)), "Fourteen","")
    =IF(ISNUMBER(SEARCH("*Septuples",J2)), "Septuples","")
    =IF(ISNUMBER(SEARCH("*Sixteen",J2)), "Sixteen","")
    =IF(ISNUMBER(SEARCH("*Triples*Major",J2)), "Triples & Major","")
    =IF(ISNUMBER(SEARCH("*Caters*Royal",J2)), "Caters & Royal","")
    =IF(ISNUMBER(SEARCH("*Cinques*Maximus",J2)), "Cinques & Maximus","")

  2. #2
    Registered User
    Join Date
    10-07-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Combining multiple IF statments

    Ok. I have now combined them as follows

    =IF(ISNUMBER(SEARCH("*Doubles",J2)), "Doubles",
    IF(ISNUMBER(SEARCH("*Minor",J2)), "Minor",
    IF(ISNUMBER(SEARCH("*Triples",J2)), "Triples",
    IF(ISNUMBER(SEARCH("*Major",J2)), "Major",
    IF(ISNUMBER(SEARCH("*Caters",J2)), "Caters",
    IF(ISNUMBER(SEARCH("*Royal",J2)), "Royal",
    IF(ISNUMBER(SEARCH("*Cinques",J2)), "Cinques",
    IF(ISNUMBER(SEARCH("*Maximus",J2)), "Maximus",
    IF(ISNUMBER(SEARCH("*Sextuples",J2)), "Sextuples",
    IF(ISNUMBER(SEARCH("*Fourteen",J2)), "Fourteen",
    IF(ISNUMBER(SEARCH("*Septuples",J2)), "Septuples",
    IF(ISNUMBER(SEARCH("*Sixteen",J2)), "Sixteen",
    IF(ISNUMBER(SEARCH("*Doubles*Minor",J2)), "Doubles & Minor",
    IF(ISNUMBER(SEARCH("*Triples*Major",J2)), "Triples & Major",
    IF(ISNUMBER(SEARCH("*Caters*Royal",J2)), "Caters & Royal",
    IF(ISNUMBER(SEARCH("*Cinques*Maximus",J2)), "Cinques & Maximus",
    ""))))))))))))))))


    however, when J2 contains the phrase "Combined Cinques and Maximus" the result is just "Cinques", rather than "Cinques & Maximus" presumably this is because of a clash between the two in bold.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.54 for Mac (home)
    Posts
    7,369

    Re: Combining multiple IF statments

    if it appears as "Combined Cinques and Maximus" why not just put that in the search (formula)?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,038

    Re: Combining multiple IF statments

    Reverse the order so multiple name searches are performed first
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Registered User
    Join Date
    10-07-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Combining multiple IF statments

    Quote Originally Posted by Special-K View Post
    Reverse the order so multiple name searches are performed first
    That's worked. Thanks v much.
    Last edited by al3xt93; 10-07-2015 at 07:35 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 08-17-2015, 11:17 AM
  2. [SOLVED] Using multiple IF statments?
    By Ben1985 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-05-2013, 02:15 PM
  3. combining if statments question - Please help
    By vitt4300 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-08-2013, 02:42 PM
  4. Multiple IF statments?
    By gballard in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-28-2013, 08:54 PM
  5. [SOLVED] Multiple if and Statments
    By jonas245 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2013, 08:57 PM
  6. multiple if statments
    By rgirardi in forum Excel General
    Replies: 10
    Last Post: 01-27-2012, 02:56 PM
  7. How to do multiple if and or statments
    By preferiti in forum Excel General
    Replies: 2
    Last Post: 04-06-2009, 07:23 PM

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