+ 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
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Using VLOOKUP to search multiple criteria IN ANY ORDER

    With your table in B2:C7, and C in A2 and E in A3, array enter the formula (enter using Ctrl-Shift-Enter and not just Enter)

    =IF(COUNTIF($B:$B,"*"&$A$2&"*"&$A$3&"*")>=ROWS($A$1:A1),INDEX($C:$C,LARGE(NOT(ISERROR(SEARCH("*"&$A$2&"*"&$A$3&"*",$B$2:$B$7)))*ROW($B$2:$B$7),COUNTIF($B:$B,"*"&$A$2&"*"&$A$3&"*")-(ROWS($A$1:A1)-1))),"")

    and copy down for 6 rows.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. Use VLOOKUP to search multiple criteria in any order
    By denialcm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2015, 06:24 PM
  2. Use VLOOKUP to search multiple criteria in any order
    By denialcm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2015, 06:24 PM
  3. Using VLOOKUP to search multiple criteria in ANY ORDER
    By denialcm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2015, 06:20 PM
  4. 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
  5. 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

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