+ Reply to Thread
Results 1 to 8 of 8

Returns a single result based on multiple criteria

  1. #1
    Registered User
    Join Date
    10-15-2015
    Location
    Italy
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Returns a single result based on multiple criteria

    Hello,

    Good day. I am trying to extract a specific prize for our raffle. The prize that a customer get depends on the combination of purchased items. We have 38 prizes to give away thus 38 combinations of items. I just can't seem to make this formula work =INDEX($P$3:$P$40,MATCH(1,(B2>=$I$3:$I$40)*(B2<$J$3:$J$40)*(C2>=$K$3:$K$40)*(D2>$L$3:$L$40)*(D2<$M$3:$M$40)*(E2>$N$3:$N$40)*(E2<$O$3:$O$40),0)). I am also thinking of using a nested if but 38 combinations might be too long for this. Any suggestions please. Many thanks.

    User ITEM A ITEM B ITEM C ITEM D Prize
    A 16.000 0.00 0.00 3.00 #N/A
    B 0.000 100.00 0.00 0.00
    C 204.000 0.00 283.00 1.00
    D 0.000 0.00 0.00 0.00

    Combination Table:

    ITEM A ITEM B ITEM C ITEM D PRIZES
    Min Max Min Max Min Max
    1 80 0 1 16 0 0 1st Prize
    80 290 0 1 16 0 0 2nd Prize
    80 290 0 16 100 0 0 3rd Prize
    80 290 0 1 16 0 1 4th Prize
    80 290 0 1 16 1 2 5th Prize
    80 290 0 1 16 2 3 6th Prize
    80 290 90 1 16 3 4 7th Prize

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Returns a single result based on multiple criteria

    Can you explain how your formula is meant to work? knowing it checks B2 against a range of cells in column I means absoultely nothing without knowing the data in there.

    Ideally if you can upload your workbook annotated to show what you want to happen.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    10-15-2015
    Location
    Italy
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: Returns a single result based on multiple criteria

    Thanks for the quick reply pjwhitfield. What I actually need to have as a result is when a customer buys Item A (1-80pcs), Item B (0pc), Item C (0-16pcs) and Item D(0) the result would be 1st Prize. In the above example, User A bought 16pcs of Item A, 0pc of Item B, 0pc Item C and 3pcs Item D, the result should be 1st Prize and so on.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Returns a single result based on multiple criteria

    Do we therefore need a list of the 38 combinations ?

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Returns a single result based on multiple criteria

    @humanoj

    you get better help if you add a small excel file, without confidential inforrmation.

    Please also add the expected result manualy in the file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    10-15-2015
    Location
    Italy
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: Returns a single result based on multiple criteria

    hello guys, thanks for the replies. Am attaching a sample file complete with 38 criteria and the expected result. Again thanks for looking into this.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Returns a single result based on multiple criteria

    See the attached:

    I used a series of Lookup tables to determine a unique (I hope) combination for each prize.

    The base formula is a simple match

    =MATCH(A2,F$2:F$6,1)

    I produced a table for all 38 combinations and using the same MATCH technique determined the combination "code" for the sample. I then used a VLOOKUP to get the Prize text.

    See tab "Criteria (2)"


    Further check on ensuring combinations are unique highlighted that Prizes 14 and 22 have same criteria.
    Attached Files Attached Files
    Last edited by JohnTopley; 04-29-2016 at 09:23 AM.

  8. #8
    Registered User
    Join Date
    10-15-2015
    Location
    Italy
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: Returns a single result based on multiple criteria

    That was fast JohnTopley! Will look into the file you sent. Thanks!

+ 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] Array formula that returns single value for multiple criteria
    By Henk Stander in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-27-2015, 02:49 AM
  2. [SOLVED] Return result based on multiple criteria..
    By Frazzfreeman in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-02-2014, 03:47 AM
  3. [SOLVED] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  4. Searching a table for multiple criteria to return single result
    By erice in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-16-2014, 09:53 AM
  5. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  6. Return Result based on Multiple Criteria
    By franciz in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-20-2009, 01:30 PM
  7. [SOLVED] vlookup based on random result returns incorrect result
    By rickat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2005, 09:20 AM

Tags for this Thread

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