+ Reply to Thread
Results 1 to 6 of 6

Returning only unique results based on multiple conditions

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Returning only unique results based on multiple conditions

    Hello,

    I have a file that is pulling in catalog information from another excel file. I am interested in creating a formula that pulls in only the unique results based upon multiple criteria.

    For example

    Line 1 A X 5
    Linie 2 A X 5
    Line 3 A X 6
    Line 4 A X 6

    How do I look up the criteria for "A" and "X" and only return the 5 and the 6 as unique results based on that combination of criteria?

    Many Thanks!

  2. #2
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Returning only unique results based on multiple conditions

    Under the Data tab, there is a "Remove Duplicates" button in 2007. You can specify which columns should be checked for duplicate information. If you don't want to delete any of the original data, copy the worksheet first.

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Returning only unique results based on multiple conditions

    Thank you - that's a simple solution to the format that may solve my problem.

    Do you have a formula that will return only the "5" and "6" in the original example?

    Thanks again.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,474

    Re: Returning only unique results based on multiple conditions

    =right(cell_address/text,number_of_places)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    Kuwait
    MS-Off Ver
    Office 365
    Posts
    2,200

    Re: Returning only unique results based on multiple conditions

    Assume data is in A2:C100,

    In E2 with CTRL+SHIFT+ENTER, rather than just ENTER

    =IFERROR(INDEX(C$2:C$100,MATCH(1,IF(A$2:A$100&"_"&B$2:B$100="A_X",IF(ISNA(MATCH(C$2:C$100,E$1:E1,0)),1)),0)),"")

    E1 must be an unique value NOT in C2:C100 eg: #Unique# or leave it blank. Then copy down.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  6. #6
    Registered User
    Join Date
    03-13-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Returning only unique results based on multiple conditions - Solved

    Thank you gentlemen, That solution worked for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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