I've searched several forums but couldn't find an answer to my question. Maybe it's not even possible in Excel but we'll see...
So, I've got my table with three columns Region, Shoe Size and Sales. What I want to achieve is to create a Top N list of shoe sizes and their corresponding sum of sales. For region A, this would be sizes 45 and 44. Should another region be selectet, also the Top 2 sizes might change, like 44 and 43 for region C:
I was not able to set up this highly dynamic Top 2 list with my Excel version Professional Plus 2016.
A solution without using pivot table is what I would need.
Can you post your actual data, rather than an image.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Thanks for introducing me to the aggregate function! I'll use that more often... Unfortunately, my example wasn't the best. For instance, if I change the region for shoe size 46 - highlighted in yellow - to "A", I get 46 as top value, whilst it should be 45 still (top by sum of sales).
Also, how could this work with string values, e.g. every number is preceeded by letter "X"?
I think the reason why you are getting 46 instead of 45, is that on your original post, on the last row you had D in the region Column not A. So,Sufiyan97 solution is valid.
Thanks to both of you for your suggestions how to solve my problem. With the example I provided, Fluffs solution worked like a charm!
Unfortunately, my example was flawed in that it has unique values for any combination of region and shoe size. But what if there are several rows with identical regions and shoe sizes and sometimes even sales. That might be the case when adding a dimension like Month but I want to show Top list for the whole year.
I know this changes the demand but this is the hump I couldn't get over.
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.