+ Reply to Thread
Results 1 to 2 of 2

Prioritized Index/Match Function with multiple criteria

  1. #1
    Registered User
    Join Date
    01-18-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    5

    Prioritized Index/Match Function with multiple criteria

    It appears that I can now attach workbooks so I've included the document which has the dataset and formulas (much easier to see in excel than what I pasted below).

    I have a data set of multiple stores that have deliveries of different items each month. Each delivery for a store is represented by a separate row and an "X" in the column for the month if the item is delivered that month. I want to summarize the data into a single row for each store and replace the "X" for the monthly delivery with the actual product delivered based on a prioritization of the products. For example: The prioritization (high to low) is (1) Banana, (2) Apple and (3) Carrots. Store 100 has only Apples delivered Month 1, Bananas and Carrots delivered Month 2, and Bananas, Apples and Carrots delivered Month 3. The output would be a single row for Store 100 that shows "Apple" in the Month 1 column, "Banana" in the Month 2 column (higher priority than carrots) and "Banana" in the Month 3 column (higher priority than both Apples and Carrots).

    The formula I currently use just steps through the priorities one at a time using a combined If statement with an array index/match (requiring SCE). I index the "x" marks in the Month (D3:D9 for month one) and then match the store ID and the first priority (H3 = Banana). If it doesn't find an "X" in the first priority, it keeps looking (H4 = Apple).

    The formula works as long as the store has a row for each possible delivery. However, if a store does not have one of the items for delivery and it gets to that portion of the if formula, the index/match formula creates an error.

    I can't post the actual formula because the thread believes it's a link. I also can't attach the workbook because I haven't posted enough times. Here's the summarized formula I'm using:

    =IF(INDEX(Month 1 Column,MATCH("Store ID" & "Priority 1 (Banana)","Dataset Store ID" & "Dataset Item Delivered",0))="X","Banana",IF(INDEX(Month 1 Column,MATCH("Store ID" & "Priority 2 (Apple)","Dataset Store ID" & "Dataset Item Delivered",0))="X","Apple",IF(INDEX(Month 1 Column,MATCH("Store ID" & "Priority 3 (Carrots)","Dataset Store ID" & "Dataset Item Delivered",0))="X","Carrots","")))
    Attached Files Attached Files
    Last edited by oniwlmh; 07-16-2019 at 02:32 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Prioritized Index/Match Function with multiple criteria

    Please try at K3
    =INDEX($H$3:$H$5,AGGREGATE(15,6,MATCH($C$3:$C$9,$H$3:$H$5,)/($B$3:$B$9=$J3)/(D$3:D$9="x"),1))

    or Table reference
    =INDEX($H$3:$H$5,AGGREGATE(15,6,MATCH(INDEX(Table1,,2),$H$3:$H$5,)/(INDEX(Table1,,1)=$J3)/(Table1[Month 1]="x"),1))

+ 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] Multiple criteria Index and Match - with a Min function and blank cells
    By mike_vr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-05-2018, 12:13 PM
  2. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  3. [SOLVED] Index-Match function with multiple criteria
    By MikeSta4ord in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-05-2015, 12:51 PM
  4. 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
  5. 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
  6. Index and match function multiple criteria
    By mfortier3 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2013, 05:27 AM
  7. SOS:Return multiple values against multi criteria match and index function
    By nitesh_inin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-26-2012, 05:45 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