+ Reply to Thread
Results 1 to 5 of 5

Top 10 Index - Match Multiple Criteria

  1. #1
    Registered User
    Join Date
    02-19-2019
    Location
    Germany
    MS-Off Ver
    365
    Posts
    3

    Top 10 Index - Match Multiple Criteria

    I try to create a top 10 list of products that have a coverage over a year ranked by inventory value. Using index match to map against the inventory value i ran into 2 problems.

    Here's the formula i use (in that case to return the item no):

    =INDEX(ITEM;MATCH(LARGE(IF((COVERAGE> 365)(COVERAGE< 9999)(CATEGORY="Bike");INVENTORY;);COUNTA(G$64:G64));INVENTORY;0))

    The large formula returns the nth inventory value for products where coverage exceeds 365 days, is less than 9999 (default value in case we don't have a sales projection) and falls into category "Bike".

    That works so far as intended, however in case the inventory value isn't unique, looking up the row via the match function gives me the first entry, not the one that's in line with the large if criteria (so it can return a product from another category).

    On top if there are less than 10 items to begin with, the large if returns a value of 0 and the index match then fills in the remaining rows out of the Top 10 with the first entries that report 0 value regardless of the if criteria.
    Attached Files Attached Files
    Last edited by MSW_80; 02-19-2019 at 10:07 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,855

    Re: Top 10 Index - Match Multiple Criteria

    Willkommen!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-19-2019
    Location
    Germany
    MS-Off Ver
    365
    Posts
    3

    Re: Top 10 Index - Match Multiple Criteria

    Edit: Original post now includes sample data.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Top 10 Index - Match Multiple Criteria

    Assuming item numbers are unique, try this method.

    In E4

    =IFERROR(AGGREGATE(14,6,(COVERAGE >365)/(COVERAGE < 9999)/(CATEGORY="65 - Bike Carriers")*INVENTORY,ROWS(E$4:E4)),"")

    Apply conditional formatting to the cells with the above formula,

    Rule:- =E4 < 0.01
    Format:- #

    This is done to blank out any zero, or almost zero results. One row in the sample was producing inventory of something like 0.000063 due to hidden decimals in sheet 1. (edit:- Check Sheet 1, cell I732)

    In A4

    =IF(ROUND(E4,2),INDEX(ITEM,AGGREGATE(14,6,(COVERAGE > 365)/(COVERAGE < 9999)/(CATEGORY="65 - Bike Carriers")/(INVENTORY=E4)*ROW(ITEM),COUNTIF(E$4:E4,E4))),"")

    In B4

    =IF(A4="","",INDEX(NAME,MATCH(A4,ITEM,0)))

    Use the last formula for the remaining columns, changing the named range as necessary.

    Edited copy of your sample attached with changes made.
    Attached Files Attached Files
    Last edited by jason.b75; 02-19-2019 at 11:06 AM.

  5. #5
    Registered User
    Join Date
    02-19-2019
    Location
    Germany
    MS-Off Ver
    365
    Posts
    3

    Re: Top 10 Index - Match Multiple Criteria

    That's perfect - thank you very much!

+ 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 with multiple criteria and date criteria
    By snolem75 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2018, 03:51 PM
  2. Replies: 16
    Last Post: 01-05-2018, 11:04 PM
  3. 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
  4. Index/Match to Match entries on multiple criteria
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 02:32 PM
  5. [SOLVED] Index Match with Multiple Criteria Using Same Criteria Column
    By rominjn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2015, 11:34 AM
  6. Replies: 2
    Last Post: 09-27-2014, 04:34 PM
  7. [SOLVED] Index Match using multiple criteria to match to
    By sacastiglia in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-25-2014, 03:46 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