+ Reply to Thread
Results 1 to 9 of 9

INDEX MATCH MAX Query

  1. #1
    Registered User
    Join Date
    09-20-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    5

    INDEX MATCH MAX Query

    So I'm new to posting on here although I refer to this site regularly so thanks for the help so far
    This is probably a really obvious question but I feel that I now can't see the wood for the trees.

    I have a spreadsheet of that goes 'Category', 'SKU', 'Sales' (B12:D8000) and at the top of my spreadsheet there is a dropdown list to select categories.
    I have a cell called 'Highest Value SKU' where I want to return the name of the SKU with the highest value relevant to that category, which will change depending on the dropdown selected.
    I hope this is making sense so far! Sorry if I'm rambling.
    I have used INDEX MATCH MAX to return the highest overall value, but want this then to be category relevant.
    So if I choose Soft Drinks in the drop down, I want it to return the name of the Highest Value SKU that is in the Soft Drinks category and I've hit a brick wall.

    Thank you in advance!

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: INDEX MATCH MAX Query

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    09-20-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    5

    Re: INDEX MATCH MAX Query

    Hi

    Thanks for your reply.
    If I upload the workbook, I will have to remove the SKU names from the column as this data is company confidential.
    This would leave that column blank.
    Is that ok?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: INDEX MATCH MAX Query

    If you post a sample (10-20 rows) you can change the skus to A, B, C, D....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    09-20-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    5

    Re: INDEX MATCH MAX Query

    Have attached a very condensed version of my document.

    In cell D3, I would like it to show me for example the highest value SKU for Tobacco when Tobacco has been selected in C2.
    And if C2 is left at "All Categories" it will show the highest value SKU across all categories.
    So far I have IF(C2="ALL CATEGORIES",INDEX($C$8:$C$928,MATCH(MAX($E$8:$E$928),$E$8:$E$928,0)) which covers the all categories part.

    Sorry if I am over complicating this.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: INDEX MATCH MAX Query

    An array formula in D3 (similar in D4):
    =IF($C$2="All Categories",MAX($E$8:$E$18),MAX(IF($B$8:$B$18=$C$2,$E$8:$E$18)))

    An ordinary formula in C3 (similar in C4):
    =INDEX($C$8:$C$18,MATCH(D3,$E$8:$E$18,0))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    I changed the DV for Soft Drinks to Soft Drinks/Juices. They must match.

    In the attached file, I added an error trap to account for missing values...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-20-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    5

    Re: INDEX MATCH MAX Query

    You are a star! Thank you so much!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: INDEX MATCH MAX Query

    I meant to add.... is there a significant chance of a tied result? This would require some changes.

    Otherwise....You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  9. #9
    Registered User
    Join Date
    09-20-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    5

    Re: INDEX MATCH MAX Query

    Probably not significant enough to warrant amending what you've already done.

    Thank you again

+ 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 text query
    By alirulez in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-05-2013, 05:51 PM
  2. [SOLVED] Index Match Offset Query
    By Excel Dumbo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-04-2013, 09:26 PM
  3. Index and three match query
    By ajayd3v in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-28-2013, 11:11 AM
  4. Index match query
    By jocer in forum Excel General
    Replies: 3
    Last Post: 07-08-2012, 07:17 AM
  5. Index Match Query
    By leekenkeong in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2012, 10:16 AM
  6. Index & Match query
    By WLM1976 in forum Excel General
    Replies: 12
    Last Post: 12-07-2006, 10:53 AM
  7. index and match query
    By kate in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2006, 08:00 PM
  8. INDEX AND MATCH QUERY ?
    By kate in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2006, 08:25 AM

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