# Combining multiple IF statments

1. ## 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. ## 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. ## Re: Combining multiple IF statments

if it appears as "Combined Cinques and Maximus" why not just put that in the search (formula)?

4. ## Re: Combining multiple IF statments

Reverse the order so multiple name searches are performed first

5. ## Re: Combining multiple IF statments

Originally Posted by Special-K
Reverse the order so multiple name searches are performed first
That's worked. Thanks v much.

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

#### 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