Dynamic Search Based on Multiple Crtieria between worksheets...Index Match, Rank, Large, Sumproduct?

crinaldi90

New Member
Joined
Feb 6, 2014
Messages
8
I have tried going about this in a variety of different ways and seem to not be able to figure out the solution. The data itself shown below is not real and is rather there just to show what I need help doing, and also for your reference the 1st worksheet is several thousand rows longer with that many titles and a total of over 50 different categories. On the 1st worksheet 'Database', I have all the sales data for each title for the past 1, 2, and 4 weeks in columns C, D, and E, and then each ranked within their specific category for the corresponding period in columns F, G, and H. On the 2nd worksheet 'Rank', cells B2 and C2 are drop downs (data validation lists) to select the category and week ranking you want to choose. These are not dynamic lists that index the first worksheet, although I think that could be a potential solution to have built in if somebody thinks that will work with what I am asking.

What I need help with is that based upon the drop down selections that are chosen in those two cells, B5 will populate the title from the 1st worksheet that has the greatest sales figures for it's category within the period chosen. Then obviously in B6 it will have the second highest and so on thereafter. Ideally, I would like to not have to have the ranking columns in the first worksheet and have the formula I need within the Rank worksheet populate by searching through just the sales figures in columns C, D, and E. I added those in there in case it is a required step by using the numbers in cells A5:A9 in the 2nd worksheet to reference the rankings in columns F,G, and H in the 1st worksheet. As an example on the Rank Worksheet, if you were to choose 'Fiction' and '2 Week', the cells with the formula I am trying to figure out would populate in order: Heroes, Martyn L, and Batman as shown below. I've tried using many variations of the Index, Match, Large, Rank, Sumproduct, Vlookup, indirect, row functions and am fairly confident that some combination of these will work, but I cant figure out what it exactly is. Let me know if this makes sense and whether I left out any important information that might be critical to understanding/answering this question. I appreciate any help or insight somebody can provide here. Thanks!

Worksheet 1: Database


ABCDEFGH
1TitleCategory1 Week2 Week4 WeekRank 1 wkRank 2 wkRank 4 wk
2LIVING IN THE END TIMESComics & Graphic Novels89109107111
3BATMANFiction27213111
4MORTE D'URBANHealth & Fitness80997210109
5BLUE ZONES, THESelf Help338455
6MINDFUL EATINGComics & Graphic Novels211913181412
7PO: HEROES ELEMENTAL CHAOSComics & Graphic Novels676770876
8TRANSMET VOL 08 NEW EDITIONPhotography232228141314
9HEROESFiction375038171715
10MARTYN LFiction241026231818
11CANNINGCooking26403811118
12WING CHUN COMPENDIUM V1Religion4023634391297
13BUDDHA V. 3Comics & Graphic Novels162521222
14ALMOST ANIMAL ALPHABETComics & Graphic Novels5671103332

<tbody>
</tbody>


Worksheet 2: Rank

ABC
1CategoryRank
2Fiction2 Week
3
4Title
51Heroes
62Martyn L
73Batman
84
95

<tbody>
</tbody>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Yes i know and that's what I would have done if there were not other components of what I am doing. On the 2nd worksheet there is more than just the title column, but this one part that I cannot figure out a solution to is preventing me finishing everything else. A pivot table conflicts with the other pieces of worksheet 2 and for those other parts to make sense I just need a solution to the scenario above.
 
Upvote 0
its complicated enough to set up a manual filter, let alone a manual, sorted one. It is possible, but by a truly messy collection of multiple instances ROW(), ROWS(), RANK(), INDEX(), MATCH(), all packed into an array formula.
From a pragmatic point of view, you really should try to work out your solution with a pivot table. Maybe you can set up your pivot table on hidden rows that show only the filters, and reference its contents it to the correct cells?
Cheers
 
Upvote 0
Select A1:H14 of Database and name the selection DB using the Name Box.

Rank

CategoryRank
Fiction2 Week
Title
1HEROES50
2MARTYN L10
3BATMAN2
4

<COLGROUP><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 92pt; mso-width-source: userset; mso-width-alt: 4380" width=123><COL style="WIDTH: 70pt; mso-width-source: userset; mso-width-alt: 3299" width=93><TBODY>
</TBODY>

B5, control+shift+enter (CSE), not just enter, and copy down:
Rich (BB code):
=IF($C5="","",INDEX(DB,SMALL(IF(INDEX(DB,0,MATCH($C$2,INDEX(DB,1,0),0))=$C5,
  ROW(DB)-ROW(INDEX(DB,1,1))+1),COUNTIF($C$5:C5,C5)),1))

C5, CSE and copy down:
Rich (BB code):
=IFERROR(LARGE(IF(INDEX(DB,0,2)=$B$2,
  INDEX(DB,0,MATCH($C$2,INDEX(DB,1,0),0))),ROWS($C$5:C5)),"")
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top