Large function

cunningAce

Board Regular
Joined
Dec 21, 2017
Messages
91
Office Version
  1. 365
Platform
  1. Windows
I have sales data for several weeks for over 100 products one sheet. Week numbers horizontally across the top, Product details vertically down the left.

I have created a drop down list (separate sheet) of week numbers and I want to return the top 10 largest sales values depending on the week number selected.

I can achieve this using an index, match function with a nested large function but only for a defined array selection.
My question is how can I get the array to look up the correct data set according to the week number selected?

Thanks

Mike
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the forum.

Doing this with formulas will drive you around the bend, for many reasons, not the least of which is ties. I suggest you use PivotTables and then a slicer to filter; PTs were built for this very purpose.
 
Upvote 0
It wouldn't be too bad for this case imo.
My thoughts are assuming:
-You have a data sheet, products down column A with no total row, Weeks across remaining top rows. Last week listed is in column Y.
-Your drop down of week number is on a sheet "Dashboard" A1 is "Rank", b1 is "Product", c1 is "Sales". 1-10 is listed in A2-A11. And your dropdown is in D1.

On Data sheet, in Z2 use this formula then fill down.

=RANK(OFFSET(A2,0,MATCH(Dashboard!$D$1,$1:$1,0)-1,1,1),OFFSET($A$2,0,MATCH(Dashboard!$D$1,$1:$1,0)-1,COUNTA(A:A)-1,1))

Then on B2 of Dashboard use the formula

=index(Data!A:A,match(a2,Data!Z:Z,0))

On C2 of the Dashboard use the formula

=index(offset(Data!A:A,0,match($D$1,Data!$1:$1,0)) , match(a2,Data!Z:Z,0))

I think that would do it, or get you close, didn't have time to test it all out, hopefully all the $ are in right places that are needed :D)

Buuuuuut. Pivot tables are your friend :D
 
Last edited:
Upvote 0
Works perfectly with a few adjustments to match my data.
I had to make each sales value a unique number using the ROW() function to avoid any 'ties'.

Thanks for the help. Much appreciated :)
 
Upvote 0

Forum statistics

Threads
1,223,631
Messages
6,173,465
Members
452,516
Latest member
archcalx

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