+ Reply to Thread
Results 1 to 11 of 11

URGENT HELP! Match function with multiple criteria

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    URGENT HELP! Match function with multiple criteria

    Hi Everyone!

    I am trying to create a sophisticated price lookup in excel and cannot determine how to do it.

    I have attached a sample workbook called "sample sheet.xlsx"

    What I need to do is return a price based on the closest match.

    For Example if I input:
    Product ID: MOSWWFPLJ
    WIDTH: 32
    DEPTH: 22
    HEIGHT: 29

    The closest match in my "sample sheet.xlsx" sheet would be:

    Product ID: MOSWWFPLJ (WILL ALWAYS AN EXACT MATCH, otherwise no price is returned)
    WIDTH: 32 (WOULD RETURN EXACT OR GREATER MATCH, IN THIS CASE GREATER MATCH IS 36)
    DEPTH: 22 (WOULD RETURN EXACT OR GREATER MATCH, IN THIS CASE GREATER MATCH IS 24)
    HEIGHT: 29 (WOULD RETURN EXACT OR GREATER MATCH, IN THIS CASE EXACT MATCH IS 29)

    Therefore, a price of MOSWWFPLJ 36"W x 24"D x 29" High would be returned. In my example that price would be $435

    If there is no exact or greater match on any field (Width, Depth, or Height), no price will be returned.

    Thank you in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: URGENT HELP! Match function with multiple criteria

    =index(E1:E37,min(if((B2<=B5:B37)*(C2<=C5:C37)*(D2<=D5:D37),row(E5:E37)))) as CSE
    in range(b5:d37) must be numbers

  3. #3
    Registered User
    Join Date
    11-27-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: URGENT HELP! Match function with multiple criteria

    Hi Tim.

    Thank you for your reply. I tried this formula and it returned the value 435 which is great! But it did not seem to take into the account the product ID of MOSWWFPLJ.

    Since I have over 20,000 product ID's how can I ensure it pulls the price based on the product ID as well. See attached updated example "Sample Sheet 2.xlsx".

    Thank you for all your help!
    Attached Files Attached Files

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: URGENT HELP! Match function with multiple criteria

    =index(E1:E37,min(if((a2=a5:a37)*(B2<=B5:B37)*(C2<=C5:C37)*(D2<=D5:D37),row(E5:E37))))

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: URGENT HELP! Match function with multiple criteria

    I suggest such a formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-27-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: URGENT HELP! Match function with multiple criteria

    Hi Czeslaw.

    Placed the formula in my excel sheet but got an error.

  7. #7
    Registered User
    Join Date
    11-01-2013
    Location
    Connecticut
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: URGENT HELP! Match function with multiple criteria

    This should work:

    =INDEX(E5:E51,MIN(IF((A5:A51=A2)*(B5:B51>=B2)*(C5:C51>=C2)*(D5:D51>=D2),ROW(E5:E51))))

  8. #8
    Registered User
    Join Date
    11-27-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: URGENT HELP! Match function with multiple criteria

    Hi ua003.

    Your formula works. However, if I try to change any of my input values it is not finding any other price than $435.

    For example if I change 32 Width to 72 Width I am still getting 435 but it should be returning 562

  9. #9
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: URGENT HELP! Match function with multiple criteria

    Bring all the data in the columns to the number format. (38_MOSWHFPRR 24 20 29,00 850,00)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-27-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: URGENT HELP! Match function with multiple criteria

    Hi Czeslaw.

    When i try to change any of the input fields i just get #NAME? error

  11. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: URGENT HELP! Match function with multiple criteria

    You enter values that do not match the values of your data.
    See another modified example.
    Attached Files Attached Files

+ 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] Index-Match function with multiple criteria
    By MikeSta4ord in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-05-2015, 12:51 PM
  2. [SOLVED] URGENT - Match Criteria and bring back multiple rows
    By Keelin in forum Excel General
    Replies: 2
    Last Post: 12-10-2014, 12:06 AM
  3. How do you drag down an index match function with multiple criteria?
    By larryg003 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2014, 01:26 PM
  4. Using MATCH and INDEX function with multiple criteria
    By Babylon in forum Excel Programming / VBA / Macros
    Replies: 52
    Last Post: 02-06-2014, 11:28 AM
  5. Multiple Criteria Index/Match Function in VBA Looking Up Dates/Strings/Numbers
    By nadstradamus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 12:35 PM
  6. Lookup or match function with multiple criteria giving different results
    By Mian USman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2013, 09:15 AM
  7. Index and match function multiple criteria
    By mfortier3 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2013, 05:27 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