+ Reply to Thread
Results 1 to 2 of 2

Using VLOOKUP to search multiple criteria in ANY ORDER

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    Washington, DC
    MS-Off Ver
    2010
    Posts
    4

    Using VLOOKUP to search multiple criteria in ANY ORDER

    Hi! I'm trying to use VLOOKUP to search for multiple criteria in a cell in any order. Here's an example of what I'm trying to do:

    C-E-R apples
    E-C-R oranges
    C-E guavas
    E-A-C pineapples
    C-R-A-E strawberries
    S-A-E toothpicks

    I want to be able to search "C" and "E", OR to search "E" and "C", and to produce the names of all the fruits no matter the order I put the letters in. I have a VLOOKUP CHOOSE formula that'll, if I look up "C" and "E", I'll get "apples", "guavas", and "strawberries", but not "pineapples" or "oranges". It's something like VLOOKUP(A2&A3,CHOOSE({1,2},B2:B10),1,FALSE) How can I modify what I have so that it produces the names of all the fruits?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using VLOOKUP to search multiple criteria in ANY ORDER

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    C-E-R
    apples
    C
    E
    apples
    2
    E-C-R
    oranges
    oranges
    3
    C-E
    guavas
    guavas
    4
    E-A-C
    pineapples
    pineapples
    5
    C-R-A-E
    strawberries
    strawberries
    6
    S-A-E
    toothpicks
    7
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F1:

    =IFERROR(INDEX(B:B,SMALL(IF(ISNUMBER(SEARCH($D$1,$A$1:A$6)+SEARCH(E$1,A$1:A$6)),ROW(A$1:A$6)),ROWS(F$1:F1))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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: 5
    Last Post: 09-01-2014, 08:05 AM
  2. search with multiple criteria from 2 sheets with the same order
    By Shacker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2013, 09:57 AM
  3. [SOLVED] VLOOKUP with multiple search criteria not working.. Need Help.
    By xlyfe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-10-2013, 01:01 PM
  4. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  5. Replies: 2
    Last Post: 10-21-2007, 08:11 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