+ Reply to Thread
Results 1 to 4 of 4

multiple search criteria formula - needs to be simplified.

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    East Sussex, England
    MS-Off Ver
    Excel 2007
    Posts
    76

    multiple search criteria formula - needs to be simplified.

    =if(not(iserror(search("A",D2))),"Arts",if(not(iserror(search("W",D2))),"World",if(not(iserror(search("E",D2))),"Enterprise",if(not(iserror(search("D",D2))),"Discovery",if(not(iserror(search("i",D2))),"i-College",if(not(iserror(search("S",D2))),"Sixth Form",""))))))


    It looks in a text for either an "A", "D", "W", "i", "S", "E". And then returns the values as above.

    Is there a way to combine the SEARCH function with an index function?

    The text is not always in a consistent place within the text hence the use of SEARCH.


    Must be usable in Google Sheets.
    Last edited by graeme27uk; 06-14-2018 at 07:54 AM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Can you simplify this formula?

    Try

    =LOOKUP(2^15,SEARCH({"S";"i";"D";"E";"W";"A"},D2),{"Sixth Form";"i-College";"Discovery";"Enterprise";"World";"Arts"})

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Can you simplify this formula?

    Another way:

    =LOOKUP(D2,{"*","A","D","E","i","S","W"},{"","Arts","Discovery","Enterprise","i-College","Sixth Form","World"})

    Or:

    =INDEX({"Arts","Discovery","Enterprise","i-College","Sixth Form","World"},MATCH(D2,{"A","D","E","i","S","W"},0))

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Can you simplify this formula?

    Hello graeme27uk & Welcome to the Forum,

    Administrative Note:
    • We would love to continue to help you with your query, but first, before we can proceed…
    • Please see Forum Rule #1 about proper thread titles and adjust accordingly...
    HTH
    Regards, Jeff

+ 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. [SOLVED] Need help to simplify formula without VBA
    By seercoven in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-31-2015, 10:19 AM
  2. Simplify a Formula
    By samsnb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2013, 03:38 PM
  3. Simplify formula
    By SalamanderSam14 in forum Excel General
    Replies: 6
    Last Post: 01-04-2012, 12:23 PM
  4. Simplify this formula?
    By kregd in forum Excel General
    Replies: 4
    Last Post: 06-12-2010, 03:35 AM
  5. Simplify the formula
    By Ivor in forum Excel General
    Replies: 4
    Last Post: 02-15-2010, 12:53 PM
  6. Simplify a Formula
    By alan_stephen75@ in forum Excel General
    Replies: 8
    Last Post: 02-20-2008, 09:32 AM
  7. Simplify formula
    By Luke in forum Excel Formulas & Functions
    Replies: 38
    Last Post: 05-06-2005, 03:06 AM

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