+ Reply to Thread
Results 1 to 4 of 4

Return list with multiple criteria and eliminate duplicates

  1. #1
    Registered User
    Join Date
    11-28-2016
    Location
    Blacksburg, Va
    MS-Off Ver
    10
    Posts
    4

    Return list with multiple criteria and eliminate duplicates

    Im trying to create a list of names from a range based on two variables, while also eliminating duplicate results or blank spaces. For example, if i want to know who has apples OR oranges:

    Huey Apples
    Dewey Pears
    Louie Oranges

    Should return:

    Huey
    Louie

    I think a INDEX MATCH in combination with an if/or should work, but I can't seem to put it together correctly....

    Thanks!

  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: Return list with multiple criteria and eliminate duplicates

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Name
    Item
    Item1
    Item2
    Name
    2
    Huey
    Apples
    Apples
    Oranges
    Huey
    3
    Dewey
    Pears
    Louie
    4
    Louie
    Oranges
    Dewey
    5
    6
    Dewey
    Apples
    7
    8
    9
    10
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F2:

    =IFERROR(INDEX(A$2:A$10,MATCH(0,IF(A$2:A$10<>"",IF(ISNUMBER(MATCH(B$2:B$10,D$2:E$2,0)),COUNTIF(F$1:F1,A$2:A$10))),0)),"")

    ** 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.

  3. #3
    Registered User
    Join Date
    11-28-2016
    Location
    Blacksburg, Va
    MS-Off Ver
    10
    Posts
    4

    Re: Return list with multiple criteria and eliminate duplicates

    You are an excel God, and I revere you. Thank you.

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

    Re: Return list with multiple criteria and eliminate duplicates

    You're welcome. Thanks for the feedback!

+ 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. Eliminate Duplicates based on several criteria
    By nomis65 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2014, 09:42 AM
  2. Return list based on multiple criteria
    By Arcadia in forum Excel General
    Replies: 1
    Last Post: 03-13-2014, 01:54 PM
  3. Return list of multiple records with duplicates
    By SoniaSonia in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-23-2013, 03:21 PM
  4. Replies: 6
    Last Post: 07-26-2011, 04:36 PM
  5. Create a list from a column and eliminate duplicates
    By Jogier505 in forum Excel General
    Replies: 11
    Last Post: 08-05-2010, 02:25 AM
  6. Return average and count from multiple criteria in a list or array of data
    By robcosta in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2008, 03:18 AM
  7. Replies: 5
    Last Post: 04-04-2005, 05:06 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